Doc: Update docs about creating Qt Quick Application projects

You now have the option to create projects that you can open in QDS.

Task-number: QTCREATORBUG-28721
Change-Id: Ia8f36fd65f2356b9987b027d7b37ac6848ff7e03
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Leena Miettinen
2023-02-23 15:54:04 +01:00
parent 00c79cc1b7
commit 90a8496cdc
12 changed files with 57 additions and 41 deletions

View File

@@ -2,10 +2,11 @@ cmake_minimum_required(VERSION 3.16)
project(accelbubble VERSION 0.1 LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.2 COMPONENTS Quick Sensors Svg Xml REQUIRED)
find_package(Qt6 6.4 REQUIRED COMPONENTS Quick Sensors Svg Xml)
qt_standard_project_setup()
qt_add_executable(appaccelbubble
main.cpp
@@ -15,7 +16,7 @@ qt_add_executable(appaccelbubble
qt_add_qml_module(appaccelbubble
URI accelbubble
VERSION 1.0
QML_FILES main.qml
QML_FILES Main.qml
RESOURCES Bluebubble.svg
)
@@ -37,4 +38,8 @@ target_compile_definitions(appaccelbubble
target_link_libraries(appaccelbubble
PRIVATE Qt6::Quick Qt6::Sensors Qt6::Svg Qt6::Xml)
install(TARGETS appaccelbubble
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
qt_finalize_executable(appaccelbubble)

View File

@@ -2,10 +2,11 @@ cmake_minimum_required(VERSION 3.16)
project(transitions VERSION 0.1 LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.2 COMPONENTS Quick REQUIRED)
find_package(Qt6 6.4 REQUIRED COMPONENTS Quick)
qt_standard_project_setup()
qt_add_executable(apptransitions
main.cpp
@@ -14,7 +15,7 @@ qt_add_executable(apptransitions
qt_add_qml_module(apptransitions
URI transitions
VERSION 1.0
QML_FILES main.qml Page.qml
QML_FILES Main.qml Page.qml
RESOURCES qt-logo.png
)
@@ -26,7 +27,10 @@ set_target_properties(apptransitions PROPERTIES
WIN32_EXECUTABLE TRUE
)
target_compile_definitions(apptransitions
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(apptransitions
PRIVATE Qt6::Quick)
PRIVATE Qt6::Quick
)
install(TARGETS apptransitions
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -58,7 +58,7 @@
In the first step, you select a template for the project. You can filter
templates (1) to view only those that apply to a particular target platform.
\image qtcreator-new-project.png
\image qtcreator-new-project.webp {New Project dialog}
Next, you select a location for the project and specify settings for it.
@@ -95,9 +95,12 @@
\li Uses a single main.cpp file.
\row
\li Qt Quick Application
\li Creates a Qt Quick 2 application project that can have both
\li Creates a Qt Quick application project that can have both
QML and C++ code. You can build the application and deploy it
to desktop, embedded, and mobile target platforms.
You can select an option to create a project that you can open
in \QDS, which has a visual editor for Qt Quick UIs.
\row
\li {1,4} Application (Qt for Python)
\li Empty Application
@@ -129,7 +132,7 @@
\row
\li Qt Quick 2 Extension Plugin
\li Creates a C++ plugin that makes it possible to offer extensions
that the QQmlEngine class can load dynamically into Qt Quick 2
that the QQmlEngine class can load dynamically into Qt Quick
applications.
\row
\li \QC Plugin
@@ -142,7 +145,7 @@
\li Qt Quick UI Prototype
\li Creates a \l{Creating Qt Quick UI Projects}{Qt Quick UI project}
with a single QML file that has the main view. You can
preview Qt Quick 2 UI projects in the
preview Qt Quick UI projects in the
\l{Validating with Target Hardware}{QML Scene preview tool}.
You do not need to build them because they do not have any
C++ code.
@@ -333,7 +336,7 @@
\uicontrol {New Subproject}. Follow the steps in the
\uicontrol {New Subproject} wizard to create a subproject.
\image qtcreator-new-qt-quick-project.png
\image qtcreator-project-qt-quick.webp {New Project dialog}
To add an existing project as a subproject, select
\uicontrol {Add Existing Projects} in the context menu.

View File

@@ -22,12 +22,12 @@
For more examples, see \l{Qt Quick Examples and Tutorials}.
You can develop Qt Quick applications also in \QDS. For more information,
see \l{Qt Design Studio Manual}.
You can use a visual editor to develop Qt Quick applications in \QDS. For
more information, see \l{Qt Design Studio Manual}.
\include qtquick-tutorial-create-empty-project.qdocinc qtquick empty application
\QC generates a component file, \e main.qml, and opens it in the
\QC generates a component file, \e Main.qml, and opens it in the
\uicontrol Edit mode.
\section1 Deploying Applications

View File

@@ -14,8 +14,6 @@
\title Creating Qt Quick Projects
\image qtcreator-new-qt-quick-project.png "New Project dialog"
The following table lists the wizard templates for creating a new
Qt Quick project from scratch.
@@ -27,9 +25,12 @@
\row
\li Application (Qt)
\li Qt Quick Application
\li Creates a Qt Quick 2 application project that can have both
\li Creates a Qt Quick application project that can have both
QML and C++ code. You can build the application and deploy it
to desktop, embedded, and mobile target platforms.
You can select an option to create a project that you can open
in \QDS.
\row
\li Application (Qt for Python)
\li Qt for Python - Qt Quick Application
@@ -39,7 +40,7 @@
\li Other Project
\li Qt Quick UI Prototype
\li Creates a Qt Quick UI project with a single QML file that
has the main view. You can preview Qt Quick 2 UI projects
has the main view. You can preview Qt Quick UI projects
in the QML Scene preview tool. You do not need to build them
because they do not have any C++ code.
@@ -47,14 +48,14 @@
template only if you are prototyping. You cannot create
a full application by using this template.
Qt Quick UI projects cannot be deployed to embedded or mobile
target platforms. For those platforms, create a Qt Quick
You cannot deploy Qt Quick UI projects to embedded or
mobile target platforms. For those platforms, create a Qt Quick
application instead.
\row
\li Library
\li Qt Quick 2 Extension Plugin
\li Creates C++ plugins that make it possible to offer extensions
that can be loaded dynamically into Qt Quick 2 applications.
that can be loaded dynamically into Qt Quick applications.
\endtable
\note The SDK for a particular target platform might install additional
@@ -72,6 +73,8 @@
\uicontrol {Application (Qt)} > \uicontrol {Qt Quick Application}
> \uicontrol Choose.
\image qtcreator-project-qt-quick.webp {New Project dialog}
\li In the \uicontrol {Project Location} dialog, \uicontrol Name field,
enter a name for the project. Keep in mind that you cannot easily
change the project name later.
@@ -84,6 +87,11 @@
\li Select \uicontrol Next (or \uicontrol Continue on \macos) to open
the \uicontrol {Define Build System} dialog.
\image qtcreator-project-qt-quick-details.webp {Define Project Details dialog}
To create a project that you can develop with a visual editor in
\QDS, select \uicontrol {Create a project that you can open in \QDS}.
\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}.
@@ -104,17 +112,6 @@
\e main.qml for editing. You can use the \l {Installing Qt}
{Qt Maintenance Tool} to install Qt Virtual Keyboard.
\li Select \uicontrol Next to open the \uicontrol {Translation File}
dialog.
\li In the \uicontrol Language field, select a language that you plan
to \l {Using Qt Linguist}{translate} the application to. You can
add other languages later by editing the project file.
\li In the \uicontrol {Translation file} field, you can edit the
name for the translation source file that will be generated
for the selected language.
\li Select \uicontrol Next to open the \uicontrol {Kit Selection}
dialog.

View File

@@ -11,6 +11,8 @@
\li Select \uicontrol File > \uicontrol {New Project} >
\uicontrol {Application (Qt)} > \uicontrol {Qt Quick Application}.
\image qtcreator-project-qt-quick.webp {New Project dialog}
\li Select \uicontrol Choose to open the
\uicontrol {Project Location} dialog.
@@ -34,16 +36,20 @@
\li Select \uicontrol Next to open the
\uicontrol {Define Project Details} dialog.
\li In the \uicontrol {Minimum required Qt version} field, select
Qt 6.2.
\image qtcreator-project-qt-quick-details.webp {Define Project Details dialog}
\li Select \uicontrol Next to open the \uicontrol {Translation File}
dialog.
\li In the \uicontrol {Minimum required Qt version} field, select
Qt 6.4.
\note This tutorial shows you how to create the application in the
\uicontrol Edit mode. If you select
\uicontrol {Create a project that you can open in \QDS}, the
following instructions won't apply.
\li Select \uicontrol Next to use the default settings and to open
the \uicontrol {Kit Selection} dialog.
\li Select Qt 6.2 or later \l{glossary-buildandrun-kit}{kits} for the
\li Select Qt 6.4 or later \l{glossary-buildandrun-kit}{kits} for the
platforms that you want to build the application for. To build
applications for mobile devices, select kits also for Android and
iOS.

View File

@@ -29,7 +29,8 @@
\note Since \QDS 2.3.0, \QDS project wizard templates generate projects that
can be built with CMake. You can open the \e CMakeLists.txt project file in
Qt Creator to continue developing the project.
Qt Creator to continue developing the project. Also, you can use Qt Creator
to create a Qt Quick Application project that you can open in \QDS.
\target wizard-template-note
\note Since \QDS 3.9.0, \QDS project wizard templates generate projects that