Qt Modules

The Qt.* modules contain properties and rules for Qt.

Creating Dependencies to Qt Modules

The Qt modules are special in that they are submodules within the Qt "namespace", which has ramifications on the syntax when expressing dependencies. Assume your product depends on the core and network modules. Then you could write:

Depends { name: "Qt.core" }
Depends { name: "Qt.network" }

Or, alternatively:

Depends { name: "Qt"; submodules: ["core", "network" } }

List of Submodules

Submodule NameQt Module NameNotes
axcontainerQAxContainerThis module is only available on Windows.
axserverQAxServerThis module is only available on Windows.
concurrentQt Concurrent
coreQt CoreAll other 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 Qt module.

For more information on the properties you can specify, see core Properties.

For more information on the relevant file tags, see core File Tags.

dbusQt D-BusFor more information on the properties you can specify, see dbus Properties.

For more information on the relevant file tags, see dbus File Tags.

declarativeQt Quick 1Provides the Qt Quick 1 module. For more information, see declarative Properties.
designerQt Designer
enginioQt Enginio
guiQt GUIFor more information on the properties you can specify, see gui Properties.

For more information on the relevant file tags, see gui File Tags.

helpQt HelpYou do not need this module for building qdoc documentation, because that functionality is part of the core module. This module is for using Qt classes such as QHelpEngine.
multimediaQt Multimedia
multimediawidgetsQt Multimedia Widgets
networkQt Network
openglQt OpenGL
phononPhonon (Qt 4 only)
printsupportQt Print Support
quickQt Quick (2)Provides the Qt Quick module (Qt Quick 2). For more information, see quick Properties.
qmlQt QML
scriptQt Script
sqlQt SQL
svgQt SVG
testlibQt Test
webkitQt WebKit
webkitwidgetsQt WebKit Widgets
widgetsQt Widgets
xmlQt XMLYou do not need this module for the QXmlStreamReader and QXmlStreamWriter classes, because those classes are a part of the core module. This module provides the deprecated DOM and SAX classes.
xmlpatternsQt XML Patterns

Module Properties

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

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 configure flags.

PropertyTypeDefaultDescription
availableBuildVariantsstringListset by qbs-setup-qtThe build variants that this Qt installation offers.
binPathpathundefinedThe path in which Qt tools such as qmake, moc and so on are located.
configstringListemptyCorresponds to the default value of qmake's CONFIG variable.
docPathpathundefinedThe path in which the Qt documentation is located.
frameworkBuildboolundefinedSpecifies whether Qt was built as a framework. This is only relevant for Darwin systems.
incPathpathundefinedThe base path of the Qt headers.
libInfixstringemptyThe 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 Qt Core library will be in a file called libQt5CoreTest.so instead of the default libQt5Core.so.
libPathpathundefinedThe path in which the Qt libraries are located.
lreleaseMultiplexModeboolfalseIf this property is true, lrelease will merge all ts files into one qm file. Otherwise, one qm file will be created for every ts file.
lreleaseNamestring"lrelease"The base name of the lrelease tool. Set this if your system uses a name such as "lrelease-qt4".
mkspecPathpathundefinedThe path in which the Qt mkspecs are located.
mocFlagsstringListemptyAdditional flags to moc. You will rarely need to set this property.
mocNamestring"moc"The base name of the moc tool. Set this if your system uses a name such as "moc-qt4".
namespacestringundefinedThe Qt namespace that can be set at build time via the configure script. By default, Qt is not built in a namespace.
pluginPathpathundefinedThe path in which the Qt plugins are located.
qdocEnvironmentstringlistundefinedThe environment for calls to qdoc. Typically, you will need to set some variables here when running qdoc to build your project documentation.
qdocNamestring"qdoc3" for Qt 4, "qdoc" otherwiseThe base name of the qdoc tool.
qmBaseNamestringproduct.targetNameThe base name of the qm file to be built from the ts files in the product. This property is ignored if lreleaseMultiplexMode is false.
qtBuildVariantstringSee below.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.

qtConfigstringListemptyCorresponds to the default value of qmake's QT_CONFIG variable.
staticBuildboolundefinedSpecifies whether Qt was built statically.
versionstringundefinedThe Qt version. Consists of three numbers separated by dots, for instance "5.1.1".
versionMajorintversionParts[0]The Qt major version.
versionMinorintversionParts[1]The Qt minor version.
versionPartslistemptyThe Qt version as a list. For instance, Qt version 5.1.1 would correspond to a value of [5, 1, 1].
versionPatchintversionParts[2]The Qt patch level.

dbus Properties

PropertyTypeDefaultDescription
xml2cppNamestring"qdbusxml2cpp"The base name of the qdbusxml2cpp tool. Set this if your system uses a different name.
xml2CppHeaderFlagsstringListempty listAdditional flags when running the qdbusxml2cpp tool to create header files.
xml2CppSourceFlagsstringListempty listAdditional flags when running the qdbusxml2cpp tool to create source files.

declarative Properties

PropertyTypeDefaultDescription
qmlDebuggingboolfalseSpecifies whether QML debugging support should be compiled into your binaries.
qmlImportsPathstringset by qbs-setup-qtThe absolute path to the directory where Qt's QML imports are installed.
qmlPathstringset by qbs-setup-qtThe absolute path to the directory where Qt's QML files are installed. This property is undefined for Qt4.

gui Properties

PropertyTypeDefaultDescription
uicNamestring"uic"The base name of the uic tool. Set this if your system uses a name such as "uic-qt4".

quick Properties

PropertyTypeDefaultDescription
qmlDebuggingboolfalseSpecifies whether QML debugging support should be compiled into your binaries.
qmlImportsPathstringset by qbs-setup-qtThe absolute path to the directory where Qt's QML imports are installed.
qmlPathstringset by qbs-setup-qtThe absolute path to the directory where Qt's QML files are installed. This property is undefined for Qt4.

Relevant File Tags

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

core File Tags

TagAuto-tagged File NamesSinceDescription
"qch"n/a1.1This tag is attached to the output artifacts of the rule that runs the qhelpgenerator tool.
"qdoc"*.qdoc1.1Source files with this tag trigger a re-execution of the rule running the qdoc tool when their timestamp changes.
"qdocconf"*.qdocconf1.1Source files with this tag trigger a re-execution of the rule running the qdoc tool when their timestamp changes.
"qdocconf-main"-1.1Source files with this tag serve as inputs to the rule running the qdoc tool.
"qdoc-output"n/a1.5Use this tag to match all qdoc outputs, for instance in a Group using the fileTagsFilter property.
"qhp"*.qhp1.1Files with this tag serve as inputs to the rule running the qhelpgenerator tool. Such files are created by qdoc, but can also appear as source files.
"qm"n/a1.1This tag is attached to the output artifacts of the rule that runs the lrelease tool.
"qrc"*.qrc1.0Files with this tag serve as inputs to the rule running the rcc tool.
"qt_plugin_metadata"-1.0Source files with this tag trigger a re-execution of the rule running the moc tool when their timestamp changes.
"ts"*.ts1.0Files with this tag serve as inputs to the rule running the lrelease tool.

dbus File Tags

TagAuto-tagged File NamesSinceDescription
"qt.dbus.adaptor"-1.5Source files with this tag serve as inputs to the rule running the qdbusxml2cpp tool, which will create an adaptor class.
"qt.dbus.interface"-1.5Source files with this tag serve as inputs to the rule running the qdbusxml2cpp tool, which will create an interface class.

gui File Tags

TagAuto-tagged File NamesSinceDescription
"ui"*.ui1.0Source files with this tag serve as inputs to the rule running the uic tool.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.