2011-12-14 15:07:05 +01:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (c) 2014 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2011-12-14 15:07:05 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator
|
2011-12-14 15:07:05 +01:00
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
** GNU Free Documentation License
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Free
|
|
|
|
|
** Documentation License version 1.3 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file included in the packaging of this
|
|
|
|
|
** file.
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
// **********************************************************************
|
|
|
|
|
// NOTE: the sections are not ordered by their logical order to avoid
|
|
|
|
|
// reshuffling the file each time the index order changes (i.e., often).
|
|
|
|
|
// Run the fixnavi.pl script to adjust the links to the index order.
|
|
|
|
|
// **********************************************************************
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
|
2014-03-17 12:18:12 +01:00
|
|
|
\contentspage {Qt Creator Manual}
|
2011-12-14 15:07:05 +01:00
|
|
|
\previouspage creator-visual-editor.html
|
|
|
|
|
\page quick-projects.html
|
|
|
|
|
\nextpage creator-using-qt-quick-designer.html
|
|
|
|
|
|
|
|
|
|
\title Creating Qt Quick Projects
|
|
|
|
|
|
|
|
|
|
\image qmldesigner-new-project.png "New File or Project dialog"
|
|
|
|
|
|
|
|
|
|
When you create a new Qt Quick project from scratch, you have the following
|
|
|
|
|
options:
|
|
|
|
|
|
|
|
|
|
\list
|
|
|
|
|
|
2013-02-06 08:50:23 +01:00
|
|
|
\li \gui {Qt Quick Application} creates a Qt Quick application project
|
2011-12-14 15:07:05 +01:00
|
|
|
that can contain both QML and C++ code. The project includes a
|
2013-11-05 12:55:47 +01:00
|
|
|
QDeclarativeView or QQuickView. You can build the application and
|
|
|
|
|
deploy it to
|
2012-03-08 13:09:42 +01:00
|
|
|
desktop and mobile target platforms.
|
|
|
|
|
|
2013-02-06 08:50:23 +01:00
|
|
|
\li \gui {Qt Quick UI} creates a Qt Quick UI project with a single QML
|
2011-12-14 15:07:05 +01:00
|
|
|
file that contains the main view. You can review Qt Quick UI
|
2012-11-20 10:54:32 +01:00
|
|
|
projects in a \l{Previewing QML Files}{preview tool} and you need
|
|
|
|
|
not build them. You do not
|
2011-12-14 15:07:05 +01:00
|
|
|
need to have the development environment installed on your
|
2012-10-30 14:27:39 +01:00
|
|
|
computer to create and run this type of project.
|
2011-12-14 15:07:05 +01:00
|
|
|
|
2013-02-06 08:50:23 +01:00
|
|
|
\li \gui {Qt Quick Extension Plugins} (in the \gui Libraries category)
|
2012-11-26 11:50:39 +01:00
|
|
|
create C++ plugins that make it possible to offer extensions that
|
|
|
|
|
can be loaded dynamically into Qt Quick applications. Select
|
|
|
|
|
\gui {Qt Quick 1 Extension Plugin} to create extensions for
|
|
|
|
|
Qt Quick 1 applications and \gui {Qt Quick 2 Extension Plugin} to
|
|
|
|
|
create extensions for Qt Quick 2 applications.
|
2011-12-14 15:07:05 +01:00
|
|
|
|
|
|
|
|
\endlist
|
|
|
|
|
|
|
|
|
|
\section1 Creating Qt Quick UI Projects
|
|
|
|
|
|
2013-11-07 15:41:21 +01:00
|
|
|
\list 1
|
|
|
|
|
|
|
|
|
|
\li Select \gui File > \gui {New File or Project} > \gui Applications >
|
|
|
|
|
\gui {Qt Quick UI} > \gui Choose.
|
|
|
|
|
|
|
|
|
|
\li In the \gui {Qt Quick component set} field, select the component set
|
|
|
|
|
to use for the project. The Qt Quick imports enable you to create
|
|
|
|
|
cross-platform applications with a custom look and feel, whereas the
|
|
|
|
|
Qt Quick Controls provide the look and feel for a particular
|
|
|
|
|
platform:
|
|
|
|
|
|
|
|
|
|
\list
|
|
|
|
|
|
2014-04-10 14:49:54 +02:00
|
|
|
\li Select \gui {Qt Quick Controls 1.1} or \gui {Qt Quick 2.2} to
|
2013-11-07 15:41:21 +01:00
|
|
|
develop for platforms that run Qt 5.
|
|
|
|
|
|
|
|
|
|
\li Select \gui {Qt Quick 1.1} to develop for platforms that run
|
|
|
|
|
Qt 4.7.4. To develop for platforms that run Qt 4.7.1, 4.7.2, or
|
|
|
|
|
4.7.3, you must change the import statement to import Qt Quick
|
|
|
|
|
1.0.
|
|
|
|
|
|
|
|
|
|
\endlist
|
|
|
|
|
|
|
|
|
|
\endlist
|
2011-12-14 15:07:05 +01:00
|
|
|
|
|
|
|
|
\QC creates the following files:
|
|
|
|
|
|
|
|
|
|
\list
|
|
|
|
|
|
2013-02-06 08:50:23 +01:00
|
|
|
\li .qmlproject project file defines that all QML, JavaScript, and image
|
2011-12-14 15:07:05 +01:00
|
|
|
files in the project folder belong to the project. Therefore, you do
|
|
|
|
|
not need to individually list all the files in the project.
|
|
|
|
|
|
2013-03-13 11:39:36 +01:00
|
|
|
\li .qml file defines an UI item, such as a component, screen, or the
|
2011-12-14 15:07:05 +01:00
|
|
|
whole application UI.
|
|
|
|
|
|
|
|
|
|
\endlist
|
|
|
|
|
|
|
|
|
|
To use JavaScript and image files in the application, copy them to the
|
|
|
|
|
project folder.
|
|
|
|
|
|
|
|
|
|
\section1 Creating Qt Quick Applications
|
|
|
|
|
|
2013-11-05 12:55:47 +01:00
|
|
|
\list 1
|
|
|
|
|
|
|
|
|
|
\li Select \gui File > \gui {New File or Project} > \gui Applications >
|
|
|
|
|
\gui {Qt Quick Application} > \gui Choose.
|
|
|
|
|
|
|
|
|
|
\li In the \gui {Qt Quick component set} field, select the component set
|
2013-11-07 15:41:21 +01:00
|
|
|
to use for the project. For more information, see
|
|
|
|
|
\l{Creating Qt Quick UI Projects}.
|
2013-11-05 12:55:47 +01:00
|
|
|
|
|
|
|
|
\li Select \l{glossary-buildandrun-kit}{kits} for running and building
|
|
|
|
|
your project, and then click \gui{Next}.
|
|
|
|
|
|
|
|
|
|
\note Kits are listed if they have been specified in \gui Tools >
|
|
|
|
|
\gui Options > \gui {Build & Run} > \gui Kits.
|
|
|
|
|
|
|
|
|
|
\li Review the project settings, and click \gui{Finish} (on Windows and
|
2014-05-02 12:44:45 +02:00
|
|
|
Linux) or \gui Done (on OS X) to create the project.
|
2013-11-05 12:55:47 +01:00
|
|
|
|
|
|
|
|
\endlist
|
2011-12-14 15:07:05 +01:00
|
|
|
|
2012-10-09 11:38:52 +02:00
|
|
|
\note The SDK for a particular target platform might install additional
|
2013-10-09 12:22:20 +02:00
|
|
|
templates for that platform. For example, the BlackBerry 10 and QNX templates are installed
|
|
|
|
|
as part of the BlackBerry 10 NDK, BlackBerry NDK, or QNX SDK.
|
2011-12-14 15:07:05 +01:00
|
|
|
|
|
|
|
|
\QC creates the necessary boilerplate files. Some of the files are
|
2012-10-09 11:38:52 +02:00
|
|
|
specific to a particular target platform.
|
2011-12-14 15:07:05 +01:00
|
|
|
|
|
|
|
|
*/
|