Qt.core

Provides Qt Core support. More...

Properties

Detailed Description

All other Qt modules have a dependency on the Qt.core module, and therefore you do not need to list it in your dependencies if you depend on at least one other Qt module.

Some of the Qt.core 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.

Relevant 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 group.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.
"qt.core.resource_data"-1.7Source files with this tag serve as inputs to the rule creating qrc files.
"ts"*.ts1.0Files with this tag serve as inputs to the rule running the lrelease tool.
"mocable"-1.13Use this tag to force Qbs to run moc on the respective files, even though they do not contain Q_OBJECT or a related macro.
"unmocable"-1.2Use this tag for files that Qbs should not run moc on, even though they contain Q_OBJECT or a related macro.

Property Documentation

availableBuildVariants : stringList

The build variants that this Qt installation offers.

Default: Set by setup-qt.


binPath : path

The path in which Qt tools such as qmake, moc, and so on are located.

Default: Undefined


combineMocOutput : bool

Whether the C++ sources created by moc are combined into a single C++ file per product. For projects where many header files are to be handled by moc, this can speed up compilation considerably. However, side effects may occur as a result of merging translation units.

Default: cpp.combineCxxSources


config : stringList

Corresponds to the default value of qmake's CONFIG variable.

Default: []


docPath : path

The path in which the Qt documentation is located.

Default: Undefined


enableBigResources : bool

Whether the Qt resource compiler is run in a two-pass fashion that supports the creation of big resources.

Default: false


enableKeywords : bool

Set this property to false if you do not want Qt to define the symbols signals, slots, and emit. This can be necessary if your project interacts with code that also defines such symbols.

Default: true


frameworkBuild : bool

Whether Qt was built as a framework. This is only relevant for Darwin systems.

Default: Undefined


incPath : path

The base path of the Qt headers.

Default: Undefined


libInfix : string

The library infix can be set at Qt build time to change the name of Qt's libraries.

For example, if the infix is "Test", on Unix systems, the Qt Core library will be in a file called libQt5CoreTest.so instead of the default libQt5Core.so.

Default: []


libPath : path

The path in which the Qt libraries are located.

Default: Undefined


lreleaseMultiplexMode : bool

If this property is true, lrelease will merge all .ts files into one .qm file. Otherwise, one .qm file will be created for each .ts file.

Default: false


lreleaseName : string

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

Default: "lrelease"


mkspecPath : path

The path in which the Qt mkspecs are located.

Default: Undefined


mocFlags : stringList

A list of additional flags to moc.

You will rarely need to set this property.

Default: []


mocName : string

The base name of the moc tool.

Set this if your system uses a name such as "moc-qt4".

Default: "moc"


namespace : string

The Qt namespace that can be set at build time via the configure script.

By default, Qt is not built in a namespace.

Default: Undefined


pluginMetaData : stringList

A list of additional plugin metadata.

The elements of the list are key-value pairs separated by the = character.

A possible use case is to set the plugin URI when building a static QML plugin:

Qt.core.pluginMetaData: ["uri=thePlugin"]

Default: []


pluginPath : path

The path in which the Qt plugins are located.

Default: Undefined


qdocEnvironment : stringList

The environment for calls to qdoc. Typically, you will need to set some variables here when running qdoc to build your project documentation.

Default: Undefined


qdocName : string

The base name of the qdoc tool.

Default: "qdoc3" for Qt 4, "qdoc" otherwise.


qmBaseName : string

The base name of the .qm file to be built from the .ts files in the product.

This property is ignored if lreleaseMultiplexMode is false.

Default: product.targetName


qtBuildVariant : string

Specifies the type of Qt libraries to build against: "debug" or "release".

Note: On some systems, it is not possible to link code built in debug mode against libraries built in release mode and vice versa.

Default: 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.


qtConfig : stringList

Corresponds to the default value of qmake's QT_CONFIG variable.

Default: []


resourceFileBaseName : string

For files tagged as qt.core.resource_data, this property determines the base name of the generated .qrc file.

If this property needs to be changed, it must be set in the corresponding product rather than in a Group.

Default: product.targetName


resourcePrefix : string

For files tagged as qt.core.resource_data, this property determines the prefix under which they will be available in the generated .qrc file.

Default: "/"


resourceSourceBase : path

For files tagged as qt.core.resource_data, this property determines which part of their path will end up in the generated .qrc file. If this property is set to undefined, only the file name is used.

Default: Undefined


staticBuild : bool

Whether Qt was built statically.

Default: Undefined


version : string

The Qt version.

Consists of three numbers separated by dots. For example "5.9.1".

Default: Undefined


versionMajor : int

The Qt major version.

Default: versionParts[0]


versionMinor : int

The Qt minor version.

Default: versionParts[1]


versionParts : list

The Qt version as a list.

For example, Qt version 5.9.1 would correspond to a value of [5, 9, 1].

Default: []


versionPatch : int

The Qt patch level.

Default: versionParts[2]


© 2018 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.