Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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 Controls
46
47 For the full list of Qt Quick Controls, see
48 \l {Qt Quick Controls QML Types}{QML Types}.
49
50 \section2 Button Controls
51
52 \annotatedlist qtquickcontrols-buttons
53
54 \section2 Container Controls
55
56 \annotatedlist qtquickcontrols-containers
57
58 \section2 Delegate Controls
59
60 \annotatedlist qtquickcontrols-delegates
61
62 \section2 Indicator Controls
63
64 \annotatedlist qtquickcontrols-indicators
65
66 \section2 Input Controls
67
68 \annotatedlist qtquickcontrols-input
69
70 \section2 Menu Controls
71
72 \annotatedlist qtquickcontrols-menus
73
74 \section2 Navigation Controls
75
76 \annotatedlist qtquickcontrols-navigation
77
78 \section2 Popup Controls
79
80 \annotatedlist qtquickcontrols-popups
81
82 \section2 Separator Controls
83
84 \annotatedlist qtquickcontrols-separators
85
86 \section1 Versions
87
88 Qt Quick Controls 2.0 was introduced in Qt 5.7. Subsequent minor Qt releases
89 increment the import version of the Qt Quick Controls modules by one,
90 until Qt 5.12, where the import versions match Qt's minor version.
91
92 In Qt 6, both the major and minor versions match, and version numbers may
93 be omitted from imports in QML. If the version is omitted, the latest
94 version will be used.
95
96 The experimental Qt Labs modules use import version 1.0.
97
98 \table
99 \header
100 \li \c Qt
101 \li \l {Qt Quick QML Types}{\c QtQuick}
102 \li \l {Qt Quick Controls QML Types}{\c QtQuick.Controls},\br
103 \l {Material Style}{\c QtQuick.Controls.Material},\br
104 \l {Universal Style}{\c QtQuick.Controls.Universal},\br
105 \l {Qt Quick Templates 2 QML Types}{\c QtQuick.Templates}
106 \li \l {Qt Labs Platform QML Types}{\c Qt.labs.platform}
107 \row
108 \li 5.7
109 \li 2.7
110 \li 2.0
111 \li 1.0
112 \row
113 \li 5.8
114 \li 2.8
115 \li 2.1
116 \li 1.0
117 \row
118 \li 5.9
119 \li 2.9
120 \li 2.2
121 \li 1.0
122 \row
123 \li 5.10
124 \li 2.10
125 \li 2.3
126 \li 1.0
127 \row
128 \li 5.11
129 \li 2.11
130 \li 2.4
131 \li 1.0
132 \row
133 \li 5.12
134 \li 2.12
135 \li 2.12
136 \li 1.0
137 \row
138 \li 6.0
139 \li 6.0
140 \li 6.0
141 \li 1.0
142 \row
143 \li ...
144 \li ...
145 \li ...
146 \li ...
147 \endtable
148
149 \section2 Revisions
150
151 Due to how Qt Quick Controls are implemented, new properties that are added
152 may clash with any user-defined properties of the same name. For example,
153 the following snippet will result in an error:
154
155 \qml
156 import QtQuick.Controls 2.13
157
158 ApplicationWindow {
159 // ...
160
161 ComboBox {
162 anchors.centerIn: parent
163
164 // As currentValue was added in 2.14, the versioned import above
165 // should cause this property to be used, but instead an error is produced:
166 // "Cannot override FINAL property"
167 property int currentValue: 0
168 }
169 }
170 \endqml
171
172 These properties should be renamed to avoid the conflict.
173
174 \section1 Module Evolution
175
176 Qt Quick Controls was originally written with touch interfaces as the
177 primary focus.
178 While it is already possible to develop desktop interfaces, work is ongoing
179 to provide a more native look and feel.
180
181 \l{Changes to Qt Quick Controls} lists important changes in the
182 module API and functionality that were done for the Qt 6 series of Qt.
183
184 \section1 Articles and Guides
185
186 \list
187 \li \l{Getting Started with Qt Quick Controls}{Getting Started}
188 \li \l{Qt Quick Controls Guidelines}{Guidelines}
189 \li \l{Styling Qt Quick Controls}{Styling}
190 \li \l{Icons in Qt Quick Controls}{Icons}
191 \li \l{Customizing Qt Quick Controls}{Customization}
192 \li \l{Using File Selectors with Qt Quick Controls}{Using File Selectors}
193 \li \l{Deploying Qt Quick Controls Applications}{Deployment}
194 \li \l{Qt Quick Controls Configuration File}{Configuration File}
195 \li \l{Supported Environment Variables in Qt Quick Controls}
196 {Environment Variables}
197 \endlist
198
199 \section1 Examples
200
201 \list
202 \li \l{Qt Quick Controls - Gallery}{Gallery}
203 \li \l{Qt Quick Controls - Chat Tutorial}{Chat Tutorial}
204 \li \l{Qt Quick Controls - Text Editor}{Text Editor}
205 \li \l{Qt Quick Controls - Wearable Demo}{Wearable Demo}
206 \li \l{Qt Quick Controls - Imagine Style Example: Automotive}{Automotive Example}
207 \li \l{Qt Quick Controls Examples}{All Examples}
208 \endlist
209
210 \section1 Reference
211
212 \list
213 \li \l{Qt Quick Controls QML Types}{QML Types}
214 \li \l{Qt Quick Controls C++ Classes}{C++ Classes}
215 \endlist
216
217 \section1 Related Modules
218
219 \list
220 \li \l{Qt Quick}
221 \li \l{Qt Quick Layouts}
222 \li \l{Qt Quick Templates 2}
223 \li \l{Qt Labs Platform}
224 \endlist
225
226 \section1 License and Attributions
227
228 Qt Quick Controls is available under commercial licenses from \l{The Qt Company}.
229 In addition, it is available under the
230 \l{GNU Lesser General Public License, version 3}, or
231 the \l{GNU General Public License, version 2}.
232 See \l{Qt Licensing} for further details.
233
234 Furthermore, Qt Quick Controls potentially contains third party
235 modules under the following permissive licenses:
236
237 \annotatedlist attributions-qtquickcontrols
238*/