forked from qt-creator/qt-creator
Doc: Qt Quick Controls in Qt Creator
Describe the Qt Quick 2 UI with Controls wizard and using controls in Qt Creator. Change-Id: I95ba128c8dde7e0e117f649f2ff974f2c6ee624c Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 46 KiB |
@@ -148,6 +148,14 @@
|
||||
installed on your computer to create and run this type of
|
||||
projects
|
||||
|
||||
\li Qt Quick 2 UI with Controls
|
||||
|
||||
Uses a single QML file that contains the main view and that
|
||||
imports the Qt Quick Controls. You can view the UI in the QML
|
||||
Scene and you need not build it. This project requires that
|
||||
you have installed the Qt Quick Controls for your Qt version
|
||||
(5.1 or later)
|
||||
|
||||
\endlist
|
||||
|
||||
\li Libraries
|
||||
|
||||
@@ -74,12 +74,16 @@
|
||||
\endlist
|
||||
|
||||
QML elements allow you to write cross-platform applications with custom look
|
||||
and feel. You can also use ready-made Qt Quick Components that enable you to
|
||||
create applications with a native look and feel for a particular target
|
||||
platform. You can install the components as part of the Qt 4 SDK.
|
||||
and feel. You can also use ready-made Qt Quick Components (for Qt 4) to
|
||||
create screens with a native look and feel for a particular target platform.
|
||||
Since Qt 5.1, a set of Qt Quick Controls is available for creating classic
|
||||
desktop-style user interfaces using Qt Quick 2.1.
|
||||
|
||||
When you use the \QC project wizard to create Qt Quick applications, you
|
||||
can select which component set to use in your application.
|
||||
You can install Qt Quick 1 Components as part of the Qt 4 SDK and the Qt
|
||||
Quick Controls as part of Qt 5.1, or later.
|
||||
|
||||
The \QC project wizards create Qt Quick applications that use Qt Quick
|
||||
Components or Controls.
|
||||
|
||||
Even if you use the Qt Quick Components, you can still write cross-platform
|
||||
applications, by using different sets of QML files for each platform.
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
need to have the development environment installed on your
|
||||
computer to create and run this type of project.
|
||||
|
||||
\gui {Qt Quick 2 UI with Controls} imports the Qt Quick Controls.
|
||||
This project requires that you have installed the Qt Quick Controls
|
||||
for your Qt version (5.1 or later).
|
||||
|
||||
\li \gui {Qt Quick Application (from Existing QML File)} converts
|
||||
existing Qt Quick applications to Qt Quick application projects.
|
||||
This enables you to run them from \QC and to deploy them to mobile
|
||||
@@ -80,8 +84,10 @@
|
||||
|
||||
\section1 Creating Qt Quick UI Projects
|
||||
|
||||
Select \gui File > \gui {New File or Project} > \gui Applications > \gui {Qt Quick 1 UI}
|
||||
or \gui {Qt Quick 2 UI} > \gui Choose and follow the instructions of the wizard.
|
||||
Select \gui File > \gui {New File or Project} > \gui Applications >
|
||||
\gui {Qt Quick 1 UI}, \gui {Qt Quick 2 UI}, or
|
||||
\gui {Qt Quick 2 UI with Controls} > \gui Choose and follow the instructions
|
||||
of the wizard.
|
||||
|
||||
\QC creates the following files:
|
||||
|
||||
|
||||
@@ -56,7 +56,8 @@
|
||||
|
||||
\li \gui {Library} pane (2) displays the building blocks that you can use to
|
||||
design applications: predefined QML elements, your own QML
|
||||
components, Qt Quick components that you import to the project, and
|
||||
components, Qt Quick components or Qt Quick Controls that you import
|
||||
to the project, and
|
||||
other resources.
|
||||
|
||||
\li \gui Canvas (3) is the working area where you create QML components and
|
||||
@@ -154,18 +155,23 @@
|
||||
components, basic elements, positioner elements, and views.
|
||||
|
||||
Sets of UI components with the look and feel of a particular mobile device
|
||||
platform have been defined for Qt Quick. They are based on standard QML
|
||||
elements. To view the UI components in the \gui {Library} pane, add import
|
||||
platform have been defined for Qt Quick 1. Since Qt 5.1, a set of Qt Quick
|
||||
Controls is available for creating classic desktop-style user interfaces
|
||||
using Qt Quick 2.1. The Qt Quick Components and Controls are based on
|
||||
standard QML elements. To view the components and controls in the
|
||||
\gui {Library} pane, add import
|
||||
statements to the .pro file of your project. For example:
|
||||
|
||||
\list
|
||||
|
||||
\li \c {import com.nokia.meego 1.0} for MeeGo
|
||||
\li \c {import QtQuick.Controls 1.0} for Qt Quick Controls
|
||||
|
||||
\endlist
|
||||
|
||||
The Qt Quick Application wizard adds the import statements automatically
|
||||
when you select the component set to use for your project.
|
||||
The \gui {Qt Quick Application} wizards for a particular platform, such as
|
||||
MeeGo Harmattan, and the \gui {Qt Quick 2 UI with Controls} wizard add the
|
||||
import statements automatically.
|
||||
|
||||
\image qmldesigner-qml-components.png "QML Components pane"
|
||||
|
||||
|
||||
@@ -40,9 +40,12 @@
|
||||
in the \gui Library pane.
|
||||
\endif
|
||||
|
||||
You can also use ready-made Qt Quick Components that allow you to create
|
||||
screens with a native look and feel for a particular target platform. You
|
||||
can install the components as part of the Qt 4 SDK.
|
||||
You can also use ready-made Qt Quick 1 Components (for Qt 4) to create
|
||||
screens with a native look and feel for a particular target platform.
|
||||
Since Qt 5.1, a set of Qt Quick Controls is available for creating classic
|
||||
desktop-style user interfaces using Qt Quick 2.1. You
|
||||
can install Qt Quick 1 Components as part of the Qt 4 SDK and the Qt Quick
|
||||
Controls as part of Qt 5.1, or later.
|
||||
|
||||
\if defined(qcmanual)
|
||||
\section1 Adding Components to Screens
|
||||
|
||||
Reference in New Issue
Block a user