summaryrefslogtreecommitdiff
path: root/doc/reference/modules/qt-modules.qdoc
blob: 3bea872fe5f93ff7daab77d443b286d1e3710399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of the Qt Build Suite.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file.  Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights.  These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/

/*!
    \contentspage index.html
    \page qt-modules.html
    \ingroup list-of-modules

    \title Qt Modules
    \brief Provide Qt support.

    The \c{Qt.*} modules contain properties and rules for Qt.

    \section1 Creating Dependencies to Qt Modules

    The Qt modules are special in that they are submodules within the \c Qt "namespace", which
    has ramifications on the syntax when expressing dependencies. Assume your product depends
    on the \c core and \c network modules. Then you could write:
    \code
    Depends { name: "Qt.core" }
    Depends { name: "Qt.network" }
    \endcode
    Or, alternatively:
    \code
    Depends { name: "Qt"; submodules: ["core", "network" } }
    \endcode

    \section1 List of Submodules

    \table
    \header
        \li Submodule Name
        \li Qt Module Name
        \li Notes
    \row
        \li axcontainer
        \li QAxContainer
        \li This module is only available on Windows.
    \row
        \li axserver
        \li QAxServer
        \li This module is only available on Windows.
    \row
        \li concurrent
        \li Qt Concurrent
        \li
    \row
        \li core
        \li Qt Core
        \li All other \c Qt modules have a dependency to this one, so you do not
            need to list it in your dependencies if you depend on at least one
            other \c Qt module.

            For more information on the properties you can specify, see
            \l{core Properties}.

            For more information on the relevant file tags, see
            \l {core File Tags}.
    \row
        \li dbus
        \li Qt D-Bus
        \li For more information on the properties you can specify, see
            \l{dbus Properties}.

            For more information on the relevant file tags, see
            \l {dbus File Tags}.
    \row
        \li declarative
        \li Qt Quick 1
        \li Provides the \c{Qt Quick 1} module. For more information, see
            \l{declarative Properties}.
    \row
        \li designer
        \li Qt Designer
        \li
    \row
        \li enginio
        \li Qt Enginio
        \li
    \row
        \li gui
        \li Qt GUI
        \li For more information on the properties you can specify,
            see \l {gui Properties}.

            For more information on the relevant file tags, see
            \l {gui File Tags}.
    \row
        \li help
        \li Qt Help
        \li You do not need this module for building \c qdoc documentation,
            because that functionality is part of the \c core module. This
            module is for using Qt classes such as \c QHelpEngine.
    \row
        \li multimedia
        \li Qt Multimedia
        \li
    \row
        \li multimediawidgets
        \li Qt Multimedia Widgets
        \li
    \row
        \li network
        \li Qt Network
        \li
    \row
        \li opengl
        \li Qt OpenGL
        \li
    \row
        \li phonon
        \li Phonon (Qt 4 only)
        \li
    \row
        \li printsupport
        \li Qt Print Support
        \li
    \row
        \li quick
        \li Qt Quick (2)
        \li Provides the \c{Qt Quick} module (Qt Quick 2). For more information,
            see \l {quick Properties}.
    \row
        \li qml
        \li Qt QML
        \li
    \row
        \li script
        \li Qt Script
        \li
    \row
        \li sql
        \li Qt SQL
        \li
    \row
        \li svg
        \li Qt SVG
        \li
    \row
        \li testlib
        \li Qt Test
        \li
    \row
        \li webkit
        \li Qt WebKit
        \li
    \row
        \li webkitwidgets
        \li Qt WebKit Widgets
        \li
    \row
        \li widgets
        \li Qt Widgets
        \li
    \row
        \li xml
        \li Qt XML
        \li You do not need this module for the \c QXmlStreamReader and
            \c QXmlStreamWriter classes, because those classes are a part of the
            \c core module. This module provides the deprecated DOM and SAX
            classes.
    \row
        \li xmlpatterns
        \li Qt XML Patterns
        \li
        \li
    \endtable

    \section1 Module Properties

    The following sections describe the properties of Qt modules that can be
    interesting to users.

    \section2 core Properties

    Some of the following properties only need to be defined if the respective installation
    of Qt was built in some unusual way, for instance by setting non-default \c configure flags.

    \table
    \header
        \li Property
        \li Type
        \li Default
        \li Description
    \row
        \li availableBuildVariants
        \li \c{stringList}
        \li set by \c{qbs-setup-qt}
        \li The build variants that this Qt installation offers.
    \row
        \li binPath
        \li \c{path}
        \li \c{undefined}
        \li The path in which Qt tools such as \c qmake, \c moc and so on are located.
    \row
        \li config
        \li \c{stringList}
        \li \c{empty}
        \li Corresponds to the default value of qmake's \c CONFIG variable.
    \row
        \li docPath
        \li \c{path}
        \li \c{undefined}
        \li The path in which the Qt documentation is located.
    \row
        \li frameworkBuild
        \li \c{bool}
        \li \c{undefined}
        \li Specifies whether Qt was built as a framework. This is only relevant for Darwin systems.
    \row
        \li incPath
        \li \c{path}
        \li \c{undefined}
        \li The base path of the Qt headers.
    \row
        \li libInfix
        \li \c{string}
        \li \c{empty}
        \li The library infix can be set at Qt build time to change the name of Qt's libraries.
            For instance, if the infix is "Test", then on Unix systems, the \c{Qt Core} library will
            be in a file called \c{libQt5CoreTest.so} instead of the default \c{libQt5Core.so}.
    \row
        \li libPath
        \li \c{path}
        \li \c{undefined}
        \li The path in which the Qt libraries are located.
    \row
        \li lreleaseMultiplexMode
        \li \c{bool}
        \li \c{false}
        \li If this property is \c true, \c lrelease will merge all ts files into one qm file.
            Otherwise, one qm file will be created for every ts file.
    \row
        \li lreleaseName
        \li \c{string}
        \li \c{"lrelease"}
        \li The base name of the \c lrelease tool. Set this if your system uses a name such as "lrelease-qt4".
    \row
        \li mkspecPath
        \li \c{path}
        \li \c{undefined}
        \li The path in which the Qt mkspecs are located.
    \row
        \li mocName
        \li \c{string}
        \li \c{"moc"}
        \li The base name of the \c moc tool. Set this if your system uses a name such as "moc-qt4".
    \row
        \li namespace
        \li \c{string}
        \li \c{undefined}
        \li The Qt namespace that can be set at build time via the \c configure script. By default,
            Qt is not built in a namespace.
    \row
        \li pluginPath
        \li \c{path}
        \li \c{undefined}
        \li The path in which the Qt plugins are located.
    \row
        \li qdocEnvironment
        \li \c{stringlist}
        \li \c{undefined}
        \li The environment for calls to \c qdoc. Typically, you will need to set some variables
            here when running \c qdoc to build your project documentation.
    \row
        \li qdocName
        \li \c{string}
        \li \c{"qdoc3"} for Qt 4, \c{"qdoc"} otherwise
        \li The base name of the \c qdoc tool.
    \row
        \li qmBaseName
        \li \c{string}
        \li \c{product.targetName}
        \li The base name of the qm file to be built from the ts files in the product.
            This property is ignored if \c lreleaseMultiplexMode is \c false.
    \row
        \li qtBuildVariant
        \li \c{string}
        \li See below.
        \li Specifies the type of Qt libraries to build against: "debug" or "release".
            The default value is the build variant of the code linking against Qt. If Qt does not
            offer that build variant, the build variant offered by Qt is chosen instead.
            \note On some systems, it is not possible to link code built in debug mode against
            libraries built in release mode and vice versa.
    \row
        \li qtConfig
        \li \c{stringList}
        \li \c{empty}
        \li Corresponds to the default value of qmake's \c QT_CONFIG variable.
    \row
        \li staticBuild
        \li \c{bool}
        \li \c{undefined}
        \li Specifies whether Qt was built statically.
    \row
        \li version
        \li \c{string}
        \li \c{undefined}
        \li The Qt version. Consists of three numbers separated by dots, for instance "5.1.1".
    \row
        \li versionMajor
        \li \c{int}
        \li \c{versionParts[0]}
        \li The Qt major version.
    \row
        \li versionMinor
        \li \c{int}
        \li \c{versionParts[1]}
        \li The Qt minor version.
    \row
        \li versionParts
        \li \c{list}
        \li \c{empty}
        \li The Qt version as a list. For instance, Qt version 5.1.1 would correspond to a value of
            \c[5, 1, 1].
    \row
        \li versionPatch
        \li \c{int}
        \li \c{versionParts[2]}
        \li The Qt patch level.
    \endtable

    \section2 dbus Properties

    \table
    \header
        \li Property
        \li Type
        \li Default
        \li Description
    \row
        \li xml2cppName
        \li \c{string}
        \li \c{"qdbusxml2cpp"}
        \li The base name of the \c qdbusxml2cpp tool. Set this if your system uses a different name.
    \row
        \li xml2CppHeaderFlags
        \li \c{stringList}
        \li empty list
        \li Additional flags when running the \c qdbusxml2cpp tool to create header files.
    \row
        \li xml2CppSourceFlags
        \li \c{stringList}
        \li empty list
        \li Additional flags when running the \c qdbusxml2cpp tool to create source files.
    \endtable

    \section2 declarative Properties

    \table
    \header
        \li Property
        \li Type
        \li Default
        \li Description
    \row
        \li qmlDebugging
        \li \c{bool}
        \li \c{false}
        \li Specifies whether QML debugging support should be compiled into your binaries.
    \row
        \li qmlImportsPath
        \li \c{string}
        \li set by \c{qbs-setup-qt}
        \li The absolute path to the directory where Qt's QML imports are installed.
    \row
        \li qmlPath
        \li \c{string}
        \li set by \c{qbs-setup-qt}
        \li The absolute path to the directory where Qt's QML files are installed.
            This property is undefined for Qt4.
    \endtable

    \section2 gui Properties

    \table
    \header
        \li Property
        \li Type
        \li Default
        \li Description
    \row
        \li uicName
        \li \c{string}
        \li \c{"uic"}
        \li The base name of the \c uic tool. Set this if your system uses a name such as "uic-qt4".
    \endtable

    \section2 quick Properties

    \table
    \header
        \li Property
        \li Type
        \li Default
        \li Description
    \row
        \li qmlDebugging
        \li \c{bool}
        \li \c{false}
        \li Specifies whether QML debugging support should be compiled into your binaries.
    \row
        \li qmlImportsPath
        \li \c{string}
        \li set by \c{qbs-setup-qt}
        \li The absolute path to the directory where Qt's QML imports are installed.
    \row
        \li qmlPath
        \li \c{string}
        \li set by \c{qbs-setup-qt}
        \li The absolute path to the directory where Qt's QML files are installed.
            This property is undefined for Qt4.

    \endtable

    \section1 Relevant File Tags

    The following sections describe the file tags that are relevant for the Qt
    modules.

    \section2 core File Tags

    \table
    \header
        \li Tag
        \li Auto-tagged File Names
        \li Since
        \li Description
    \row
        \li \c{"qch"}
        \li n/a
        \li 1.1
        \li This tag is attached to the output artifacts of the rule that runs the
            \c qhelpgenerator tool.
    \row
        \li \c{"qdoc"}
        \li \c{*.qdoc}
        \li 1.1
        \li Source files with this tag trigger a re-execution of the rule running the \c qdoc
            tool when their timestamp changes.
    \row
        \li \c{"qdocconf"}
        \li \c{*.qdocconf}
        \li 1.1
        \li Source files with this tag trigger a re-execution of the rule running the \c qdoc
            tool when their timestamp changes.
    \row
        \li \c{"qdocconf-main"}
        \li -
        \li 1.1
        \li Source files with this tag serve as inputs to the rule running the \c qdoc tool.
    \row
        \li \c{"qdoc-output"}
        \li n/a
        \li 1.5
        \li Use this tag to match all \c qdoc outputs, for instance in a \l{Group Item}{Group}
            using the \c fileTagsFilter property.
    \row
        \li \c{"qhp"}
        \li \c{*.qhp}
        \li 1.1
        \li Files with this tag serve as inputs to the rule running the \c qhelpgenerator tool.
            Such files are created by \c qdoc, but can also appear as source files.
    \row
        \li \c{"qm"}
        \li n/a
        \li 1.1
        \li This tag is attached to the output artifacts of the rule that runs the \c lrelease tool.
    \row
        \li \c{"qrc"}
        \li \c{*.qrc}
        \li 1.0
        \li Files with this tag serve as inputs to the rule running the \c rcc tool.
    \row
        \li \c{"qt_plugin_metadata"}
        \li -
        \li 1.0
        \li Source files with this tag trigger a re-execution of the rule running the \c moc
            tool when their timestamp changes.
    \row
        \li \c{"ts"}
        \li \c{*.ts}
        \li 1.0
        \li Files with this tag serve as inputs to the rule running the \c lrelease tool.
    \endtable

    \section2 dbus File Tags

    \table
    \header
        \li Tag
        \li Auto-tagged File Names
        \li Since
        \li Description
    \row
        \li \c{"qt.dbus.adaptor"}
        \li -
        \li 1.5
        \li Source files with this tag serve as inputs to the rule running the \c qdbusxml2cpp tool,
            which will create an adaptor class.
    \row
        \li \c{"qt.dbus.interface"}
        \li -
        \li 1.5
        \li Source files with this tag serve as inputs to the rule running the \c qdbusxml2cpp tool,
            which will create an interface class.
    \endtable

    \section2 gui File Tags

    \table
    \header
        \li Tag
        \li Auto-tagged File Names
        \li Since
        \li Description
    \row
        \li \c{"ui"}
        \li \c{*.ui}
        \li 1.0
        \li Source files with this tag serve as inputs to the rule running the \c uic tool.
    \endtable
*/