forked from qt-creator/qt-creator
Doc: Update info about creating Qt Quick Application projects
All of them now have the same dialogs and settings, so describe them only once. Use a shorter version for tutorials. Task-number: QTCREATORBUG-23364 Change-Id: I2f71f7016aa02b98dcbe1551680dc27737db93f7 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -32,36 +32,47 @@
|
|||||||
|
|
||||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||||
\uicontrol {Application (Qt Quick)} >
|
\uicontrol {Application (Qt Quick)} >
|
||||||
\uicontrol {Qt Quick Application - Swipe} > \uicontrol Choose.
|
\uicontrol {Qt Quick Application - Swipe}.
|
||||||
|
|
||||||
|
\li Select \uicontrol Choose to open the
|
||||||
|
\uicontrol {Project Location} dialog.
|
||||||
|
|
||||||
\li In the \uicontrol Name field, enter a name for the application.
|
\li In the \uicontrol Name field, enter a name for the application.
|
||||||
|
|
||||||
\li In the \uicontrol {Create in} field, enter the path for the project
|
\li In the \uicontrol {Create in} field, enter the path for the project
|
||||||
files, and then select \uicontrol Next (or \uicontrol Continue on
|
files.
|
||||||
\macos).
|
|
||||||
|
\li Select \uicontrol Next (or \uicontrol Continue on \macos) to open
|
||||||
|
the \uicontrol {Define Build System} dialog.
|
||||||
|
|
||||||
\li In the \uicontrol {Build system} field, select the build system to
|
\li In the \uicontrol {Build system} field, select the build system to
|
||||||
use for building and running the project: \l qmake,
|
use for building and running the project: \l qmake,
|
||||||
\l {Setting Up CMake}{CMake}, or \l {Setting Up Qbs}{Qbs}.
|
\l {Setting Up CMake}{CMake}, or \l {Setting Up Qbs}{Qbs}.
|
||||||
|
|
||||||
\li In the \uicontrol {Qt Quick Controls Style} field, select one of
|
\li Select \uicontrol Next to open the
|
||||||
the predefined \l{Styling Qt Quick Controls}{UI styles} to use,
|
\uicontrol {Define Project Details} dialog.
|
||||||
and then select \uicontrol Next.
|
|
||||||
|
\li Select \uicontrol Next to use the default settings and to open
|
||||||
|
the \uicontrol {Translation File} dialog.
|
||||||
|
|
||||||
|
\li Select \uicontrol Next to use the default settings and to open
|
||||||
|
the \uicontrol {Kit Selection} dialog.
|
||||||
|
|
||||||
\li Select \l{glossary-buildandrun-kit}{kits} for the platforms that
|
\li Select \l{glossary-buildandrun-kit}{kits} for the platforms that
|
||||||
you want to build the application for. To build applications for
|
you want to build the application for. To build applications for
|
||||||
mobile devices, select kits for Android ARM and iPhone OS, and
|
mobile devices, select kits for Android ARM and iPhone OS.
|
||||||
click \uicontrol{Next}.
|
|
||||||
|
|
||||||
\note Kits are listed if they have been specified in \uicontrol
|
\note Kits are listed if they have been specified in \uicontrol
|
||||||
Tools > \uicontrol Options > \uicontrol Kits (on Windows and Linux)
|
Tools > \uicontrol Options > \uicontrol Kits (on Windows and Linux)
|
||||||
or in \uicontrol {\QC} > \uicontrol Preferences >
|
or in \uicontrol {\QC} > \uicontrol Preferences >
|
||||||
\uicontrol Kits (on \macos).
|
\uicontrol Kits (on \macos).
|
||||||
|
For more information, see \l {Adding Kits}.
|
||||||
|
|
||||||
\li Select \uicontrol Next.
|
\li Select \uicontrol Next to open the \uicontrol {Project Management}
|
||||||
|
dialog.
|
||||||
|
|
||||||
\li Review the project settings, and click \uicontrol{Finish} (or
|
\li Review the project settings, and select \uicontrol{Finish}
|
||||||
\uicontrol Done on \macos).
|
(or \uicontrol Done on \macos) to create the project.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
@@ -71,5 +82,8 @@
|
|||||||
in the \uicontrol {Text Editor} to add the application logic. For the
|
in the \uicontrol {Text Editor} to add the application logic. For the
|
||||||
purposes of this example, you can ignore \e Page2Form.ui.qml.
|
purposes of this example, you can ignore \e Page2Form.ui.qml.
|
||||||
|
|
||||||
|
For more information about the settings that you skipped, see
|
||||||
|
\l{Creating Qt Quick Applications}.
|
||||||
|
|
||||||
//! [qt quick application]
|
//! [qt quick application]
|
||||||
*/
|
*/
|
||||||
|
@@ -100,30 +100,44 @@
|
|||||||
\QC creates the necessary boilerplate files. Some of the files are
|
\QC creates the necessary boilerplate files. Some of the files are
|
||||||
specific to a particular target platform.
|
specific to a particular target platform.
|
||||||
|
|
||||||
\section1 Creating Empty Qt Quick Applications
|
\section1 Creating Qt Quick Applications
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||||
\uicontrol {Application (Qt Quick)} >
|
\uicontrol {Application (Qt Quick)}.
|
||||||
\uicontrol {Qt Quick Application - Empty} > \uicontrol Choose.
|
|
||||||
|
\li Select the application type:
|
||||||
|
\list
|
||||||
|
\li \uicontrol {Qt Quick Application - Empty}
|
||||||
|
\li \uicontrol {Qt Quick Application - Scroll}
|
||||||
|
\li \uicontrol {Qt Quick Application - Stack}
|
||||||
|
\li \uicontrol {Qt Quick Application - Swipe}
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\li Select \uicontrol Choose to open the \uicontrol {Project Location}
|
||||||
|
dialog.
|
||||||
|
|
||||||
\li In the \uicontrol Name field, enter a name for the application.
|
\li In the \uicontrol Name field, enter a name for the application.
|
||||||
|
|
||||||
\li In the \uicontrol {Create in} field, enter the path for the project
|
\li In the \uicontrol {Create in} field, enter the path for the project
|
||||||
files, and then select \uicontrol Next (or \uicontrol Continue on
|
files. Select the \uicontrol {Use as default project location} check
|
||||||
\macos).
|
box to create new projects in this folder by default.
|
||||||
|
|
||||||
|
\li Select \uicontrol Next (or \uicontrol Continue on \macos) to open
|
||||||
|
the \uicontrol {Define Build System} dialog.
|
||||||
|
|
||||||
\li In the \uicontrol {Build system} field, select the build system to
|
\li In the \uicontrol {Build system} field, select the build system to
|
||||||
use for building and running the project: \l qmake,
|
use for building and running the project: \l qmake,
|
||||||
\l {Setting Up CMake}{CMake}, or \l {Setting Up Qbs}{Qbs}.
|
\l {Setting Up CMake}{CMake}, or \l {Setting Up Qbs}{Qbs}.
|
||||||
|
|
||||||
\li Select \uicontrol Next.
|
\li Select \uicontrol Next to open the
|
||||||
|
\uicontrol {Define Project Details} dialog.
|
||||||
|
|
||||||
\li Select the Qt version to
|
\li Select the Qt version to develop with in the
|
||||||
develop with in the \uicontrol {Minimal required Qt version} field.
|
\uicontrol {Minimal required Qt version} field.
|
||||||
The Qt version determines the Qt Quick imports that are used in the
|
The Qt version determines the Qt Quick imports
|
||||||
QML files.
|
that are used in the QML files.
|
||||||
|
|
||||||
\li Select the \uicontrol {Use Qt Virtual Keyboard} check box to add
|
\li Select the \uicontrol {Use Qt Virtual Keyboard} check box to add
|
||||||
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
|
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
|
||||||
@@ -135,7 +149,8 @@
|
|||||||
You can use the \l {Installing Qt}{Qt Maintenance Tool} to install
|
You can use the \l {Installing Qt}{Qt Maintenance Tool} to install
|
||||||
Qt Virtual Keyboard.
|
Qt Virtual Keyboard.
|
||||||
|
|
||||||
\li Select \uicontrol Next.
|
\li Select \uicontrol Next to open the \uicontrol {Translation File}
|
||||||
|
dialog.
|
||||||
|
|
||||||
\li In the \uicontrol Language field, select a language that you plan
|
\li In the \uicontrol Language field, select a language that you plan
|
||||||
to \l {Using Qt Linguist}{translate} the application to. You can
|
to \l {Using Qt Linguist}{translate} the application to. You can
|
||||||
@@ -145,83 +160,42 @@
|
|||||||
name for the translation source file that will be generated
|
name for the translation source file that will be generated
|
||||||
for the selected language.
|
for the selected language.
|
||||||
|
|
||||||
\li Select \uicontrol Next.
|
\li Select \uicontrol Next to open the \uicontrol {Kit Selection}
|
||||||
|
dialog.
|
||||||
\li Select \l{glossary-buildandrun-kit}{kits} for running and building
|
|
||||||
your project, and then click \uicontrol Next.
|
|
||||||
|
|
||||||
\note Kits are listed if they have been specified in
|
|
||||||
\uicontrol Tools > \uicontrol Options > \uicontrol Kits.
|
|
||||||
|
|
||||||
\li Review the project settings, and click \uicontrol Finish (on Windows
|
|
||||||
and Linux) or \uicontrol Done (on \macos) to create the project.
|
|
||||||
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
\QC generates a QML file, \e main.qml, that you can modify in the Design
|
|
||||||
mode.
|
|
||||||
|
|
||||||
\include creator-python-project.qdocinc python qml project wizards
|
|
||||||
|
|
||||||
\section1 Creating Qt Quick Controls Applications
|
|
||||||
|
|
||||||
\list 1
|
|
||||||
|
|
||||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
|
||||||
\uicontrol {Application (Qt Quick)} >
|
|
||||||
\uicontrol {Qt Quick Application - Scroll},
|
|
||||||
\uicontrol {Qt Quick Application - Stack}, or
|
|
||||||
\uicontrol {Qt Quick Application - Swipe} > \uicontrol Choose.
|
|
||||||
|
|
||||||
\li In the \uicontrol Name field, enter a name for the application.
|
|
||||||
|
|
||||||
\li In the \uicontrol {Create in} field, enter the path for the project
|
|
||||||
files, and then select \uicontrol Next (or \uicontrol Continue on
|
|
||||||
\macos).
|
|
||||||
|
|
||||||
\li In the \uicontrol {Build system} field, select the build system to
|
|
||||||
use for building and running the project: \l qmake,
|
|
||||||
\l {Setting Up CMake}{CMake}, or \l {Setting Up Qbs}{Qbs}.
|
|
||||||
|
|
||||||
\li In the \uicontrol {Qt Quick Controls Style} field, select one of
|
|
||||||
the predefined \l{Styling Qt Quick Controls}{UI styles} to use,
|
|
||||||
and then select \uicontrol Next.
|
|
||||||
|
|
||||||
\li Select the \uicontrol {Use Qt Virtual Keyboard} check box to add
|
|
||||||
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
|
|
||||||
{Qt Virtual Keyboard} to the application.
|
|
||||||
|
|
||||||
\note \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
|
|
||||||
{Qt Virtual Keyboard} is not supported for Android and iOS.
|
|
||||||
|
|
||||||
\li Select \l{glossary-buildandrun-kit}{kits} for the platforms that
|
\li Select \l{glossary-buildandrun-kit}{kits} for the platforms that
|
||||||
you want to build the application for. To build applications for
|
you want to build the application for.
|
||||||
mobile devices, select kits for Android ARM and iOS, and
|
|
||||||
click \uicontrol{Next}.
|
|
||||||
|
|
||||||
\note Kits are listed if they have been specified in \uicontrol
|
\note Kits are listed if they have been specified in \uicontrol
|
||||||
Tools > \uicontrol Options > \uicontrol Kits (on Windows and Linux)
|
Tools > \uicontrol Options > \uicontrol Kits (on Windows and Linux)
|
||||||
or in \uicontrol {\QC} > \uicontrol Preferences >
|
or in \uicontrol {\QC} > \uicontrol Preferences >
|
||||||
\uicontrol Kits (on \macos).
|
\uicontrol Kits (on \macos).
|
||||||
|
For more information, see \l {Adding Kits}.
|
||||||
|
|
||||||
\li Select \uicontrol Next.
|
\li Select \uicontrol Next to open the \uicontrol {Project Management}
|
||||||
|
dialog.
|
||||||
|
|
||||||
\li Review the project settings, and click \uicontrol{Finish} (or
|
\li Review the project settings, and select \uicontrol Finish
|
||||||
\uicontrol Done on \macos).
|
(on Windows and Linux) or \uicontrol Done (on \macos) to
|
||||||
|
create the project.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
For the Scroll application, \QC creates a QML file, \e main.qml, that you
|
For the Empty and Scroll applications, \QC creates a QML file,
|
||||||
can modify in the Design mode.
|
\e main.qml, that you can modify in the \uicontrol {Form Editor}
|
||||||
|
or the \uicontrol {Text Editor}.
|
||||||
|
|
||||||
For the Stack and Swipe applications, \QC generates two UI files,
|
For the Stack and Swipe applications, \QC generates two UI files,
|
||||||
\e Page1Form.ui.qml and \e Page2Form.ui.qml, that you can modify in the
|
\e Page1Form.ui.qml and \e Page2Form.ui.qml, that you can modify in the
|
||||||
\uicontrol {Form Editor} and a QML file, \e main.qml, that you can
|
\uicontrol {Form Editor} and a QML file, \e main.qml, that you can
|
||||||
modify in the \uicontrol {Text Editor} to add the application logic.
|
modify in the \uicontrol {Text Editor} to add the application logic.
|
||||||
|
|
||||||
|
\include creator-python-project.qdocinc python qml project wizards
|
||||||
|
|
||||||
\section1 Creating Qt Quick UI Projects
|
\section1 Creating Qt Quick UI Projects
|
||||||
|
|
||||||
Qt Quick UI projects are useful for testing or prototyping user interfaces,
|
Qt Quick UI Prototype projects are useful for testing or prototyping user
|
||||||
|
interfaces,
|
||||||
or for setting up a separate project just for QML editing, for example. You
|
or for setting up a separate project just for QML editing, for example. You
|
||||||
cannot use them for application development, because they do not contain:
|
cannot use them for application development, because they do not contain:
|
||||||
|
|
||||||
@@ -232,13 +206,28 @@
|
|||||||
{devices}
|
{devices}
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
To create a Qt Quick UI project:
|
For more information about how to turn Qt Quick UI Prototype projects into
|
||||||
|
Qt Quick Application projects, see
|
||||||
|
\l{Converting UI Projects to Applications}.
|
||||||
|
|
||||||
|
To create a Qt Quick UI Prototype project:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||||
\uicontrol {Other Project} > \uicontrol {Qt Quick UI Prototype} >
|
\uicontrol {Other Project} > \uicontrol {Qt Quick UI Prototype}.
|
||||||
\uicontrol Choose.
|
|
||||||
|
\li Select \uicontrol Choose to open the \uicontrol {Project Location}
|
||||||
|
dialog.
|
||||||
|
|
||||||
|
\li In the \uicontrol Name field, enter a name for the application.
|
||||||
|
|
||||||
|
\li In the \uicontrol {Create in} field, enter the path for the project
|
||||||
|
files. Select the \uicontrol {Use as default project location} check
|
||||||
|
box to create new projects in this folder by default.
|
||||||
|
|
||||||
|
\li Select \uicontrol Next (or \uicontrol Continue on \macos) to open
|
||||||
|
the \uicontrol {Define Project Details} dialog.
|
||||||
|
|
||||||
\li In the \uicontrol {Minimal required Qt version} field, select the Qt
|
\li In the \uicontrol {Minimal required Qt version} field, select the Qt
|
||||||
version to develop with. The Qt version determines the Qt Quick
|
version to develop with. The Qt version determines the Qt Quick
|
||||||
@@ -252,10 +241,30 @@
|
|||||||
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
|
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
|
||||||
{Qt Virtual Keyboard} to the application.
|
{Qt Virtual Keyboard} to the application.
|
||||||
|
|
||||||
\li Select \uicontrol Next (or \uicontrol Continue on \macos).
|
\note If you have not installed the Qt Virtual Keyboard module when
|
||||||
|
you installed Qt, an error message will appear when you try to open
|
||||||
|
the \e main.qml in the \uicontrol {Form Editor} in the Design mode.
|
||||||
|
You can use the \l {Installing Qt}{Qt Maintenance Tool} to install
|
||||||
|
Qt Virtual Keyboard.
|
||||||
|
|
||||||
\li Review the project settings, and click \uicontrol Finish (on Windows
|
\li Select \uicontrol Next to open the \uicontrol {Kit Selection}
|
||||||
and Linux) or \uicontrol Done (on \macos) to create the project.
|
dialog.
|
||||||
|
|
||||||
|
\li Select \l{glossary-buildandrun-kit}{kits} for the platforms that
|
||||||
|
you want to build the application for.
|
||||||
|
|
||||||
|
\note Kits are listed if they have been specified in \uicontrol
|
||||||
|
Tools > \uicontrol Options > \uicontrol Kits (on Windows and Linux)
|
||||||
|
or in \uicontrol {\QC} > \uicontrol Preferences >
|
||||||
|
\uicontrol Kits (on \macos).
|
||||||
|
For more information, see \l {Adding Kits}.
|
||||||
|
|
||||||
|
\li Select \uicontrol Next to open the \uicontrol {Project Management}
|
||||||
|
dialog.
|
||||||
|
|
||||||
|
\li Review the project settings, and select \uicontrol Finish
|
||||||
|
(on Windows and Linux) or \uicontrol Done (on \macos) to
|
||||||
|
create the project.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user