Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtquickcontrols-index.qdoc
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \page qtquickcontrols-index.html
6 \keyword Qt Quick Controls 2
7 \title Qt Quick Controls
8
9 \brief Provides a set of UI controls for Qt Quick.
10
11 Qt Quick Controls provides a set of controls that can be used
12 to build complete interfaces in Qt Quick. The module was introduced
13 in Qt 5.7.
14
15 \image qtquickcontrols-styles.png
16
17 Qt Quick Controls comes with a selection of customizable styles.
18 See \l {Styling Qt Quick Controls} for more details.
19
20
21 \section1 Using the Module
22
23 \section2 QML API
24
25 \include {module-use.qdocinc} {using the qml api} {QtQuick.Controls}
26
27 \section2 C++ API
28
29 \include {module-use.qdocinc} {using the c++ api}
30
31 \section3 Building with CMake
32
33 \include {module-use.qdocinc} {building with cmake} {QuickControls2}
34
35 \section3 Building with qmake
36
37 \include {module-use.qdocinc} {building_with_qmake} {quickcontrols2}
38
39 \section2 Building From Source
40
41 The \b{Qt Image Formats} module is recommended, but not
42 required. It provides support for the \c {.webp} format used by the
43 \l {Animated Images}{Imagine style}.
44
45 \section1 Versions
46
47 Qt Quick Controls 2.0 was introduced in Qt 5.7. Subsequent minor Qt releases
48 increment the import version of the Qt Quick Controls modules by one,
49 until Qt 5.12, where the import versions match Qt's minor version.
50
51 In Qt 6, both the major and minor versions match, and version numbers may
52 be omitted from imports in QML. If the version is omitted, the latest
53 version will be used.
54
55 The experimental Qt Labs modules use import version 1.0.
56
57 \table
58 \header
59 \li \c Qt
60 \li \l {Qt Quick QML Types}{\c QtQuick}
61 \li \l {Qt Quick Controls QML Types}{\c QtQuick.Controls},\br
62 \l {Material Style}{\c QtQuick.Controls.Material},\br
63 \l {Universal Style}{\c QtQuick.Controls.Universal},\br
64 \l {Qt Quick Templates 2 QML Types}{\c QtQuick.Templates}
65 \li \l {Qt Labs Platform QML Types}{\c Qt.labs.platform}
66 \row
67 \li 5.7
68 \li 2.7
69 \li 2.0
70 \li 1.0
71 \row
72 \li 5.8
73 \li 2.8
74 \li 2.1
75 \li 1.0
76 \row
77 \li 5.9
78 \li 2.9
79 \li 2.2
80 \li 1.0
81 \row
82 \li 5.10
83 \li 2.10
84 \li 2.3
85 \li 1.0
86 \row
87 \li 5.11
88 \li 2.11
89 \li 2.4
90 \li 1.0
91 \row
92 \li 5.12
93 \li 2.12
94 \li 2.12
95 \li 1.0
96 \row
97 \li 6.0
98 \li 6.0
99 \li 6.0
100 \li 1.0
101 \row
102 \li ...
103 \li ...
104 \li ...
105 \li ...
106 \endtable
107
108 \section2 Revisions
109
110 Due to how Qt Quick Controls are implemented, new properties that are added
111 may clash with any user-defined properties of the same name. For example,
112 the following snippet will result in an error:
113
114 \qml
115 import QtQuick.Controls 2.13
116
117 ApplicationWindow {
118 // ...
119
120 ComboBox {
121 anchors.centerIn: parent
122
123 // As currentValue was added in 2.14, the versioned import above
124 // should cause this property to be used, but instead an error is produced:
125 // "Cannot override FINAL property"
126 property int currentValue: 0
127 }
128 }
129 \endqml
130
131 These properties should be renamed to avoid the conflict.
132
133 \section1 Module Evolution
134
135 Qt Quick Controls was originally written with touch interfaces as the
136 primary focus.
137 While it is already possible to develop desktop interfaces, work is ongoing
138 to provide a more native look and feel.
139
140 \l{Changes to Qt Quick Controls} lists important changes in the
141 module API and functionality that were done for the Qt 6 series of Qt.
142
143 \section1 Articles and Guides
144
145 \list
146 \li \l{Getting Started with Qt Quick Controls}{Getting Started}
147 \li \l{Qt Quick Controls Guidelines}{Guidelines}
148 \li \l{Styling Qt Quick Controls}{Styling}
149 \li \l{Icons in Qt Quick Controls}{Icons}
150 \li \l{Customizing Qt Quick Controls}{Customization}
151 \li \l{Using File Selectors with Qt Quick Controls}{Using File Selectors}
152 \li \l{Deploying Qt Quick Controls Applications}{Deployment}
153 \li \l{Qt Quick Controls Configuration File}{Configuration File}
154 \li \l{Supported Environment Variables in Qt Quick Controls}
155 {Environment Variables}
156 \endlist
157
158 \section1 Examples
159
160 \list
161 \li \l{Qt Quick Controls - Gallery}{Gallery}
162 \li \l{Qt Quick Controls - Chat Tutorial}{Chat Tutorial}
163 \li \l{Qt Quick Controls - Text Editor}{Text Editor}
164 \li \l{Qt Quick Controls - Wearable Demo}{Wearable Demo}
165 \li \l{Qt Quick Controls - Imagine Style Example: Automotive}{Automotive Example}
166 \li \l{Qt Quick Controls Examples}{All Examples}
167 \endlist
168
169 \section1 Reference
170
171 \list
172 \li \l{Qt Quick Controls QML Types}{QML Types}
173 \li \l{Qt Quick Controls C++ Classes}{C++ Classes}
174 \endlist
175
176 \section1 Related Modules
177
178 \list
179 \li \l{Qt Quick}
180 \li \l{Qt Quick Layouts}
181 \li \l{Qt Quick Templates 2}
182 \li \l{Qt Labs Platform}
183 \endlist
184
185 \section1 License and Attributions
186
187 Qt Quick Controls is available under commercial licenses from \l{The Qt Company}.
188 In addition, it is available under the
189 \l{GNU Lesser General Public License, version 3}, or
190 the \l{GNU General Public License, version 2}.
191 See \l{Qt Licensing} for further details.
192
193 Furthermore, Qt Quick Controls potentially contains third party
194 modules under the following permissive licenses:
195
196 \generatelist{groupsbymodule attributions-qtquickcontrols}
197*/