- Qbs Manual
- Qt Modules
- Qt Build Suite 1.4.3

# 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 Name | Qt Module Name | Notes
--- | --- | ---
axcontainer | QAxContainer | This module is only available on Windows.
axserver | QAxServer | This module is only available on Windows.
concurrent | Qt Concurrent |
core | Qt Core | All 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.
dbus | Qt D-Bus |
declarative | Qt Quick 1 | Provides the `Qt Quick 1` module. For more information, see declarative Properties.
designer | Qt Designer |
enginio | Qt Enginio |
gui | Qt GUI | For more information, see gui Properties.
help | Qt Help | You 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`.
multimedia | Qt Multimedia |
multimediawidgets | Qt Multimedia Widgets |
network | Qt Network |
opengl | Qt OpenGL |
phonon | Phonon (Qt 4 only) |
printsupport | Qt Print Support |
quick | Qt Quick (2) | Provides the `Qt Quick` module (Qt Quick 2). For more information, see quick Properties.
qml | Qt QML |
script | Qt Script |
sql | Qt SQL |
svg | Qt SVG |
testlib | Qt Test |
webkit | Qt WebKit |
webkitwidgets | Qt WebKit Widgets |
widgets | Qt Widgets |
xml | Qt XML | You 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.
xmlpatterns | Qt XML Patterns |  |

## core Properties

As opposed to most other `Qt` modules, `core` defines a number of properties that can be interesting to users. Some of them 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.

Property | Type | Default | Description
--- | --- | --- | ---
availableBuildVariants | `stringList` | set by `qbs-setup-qt` | The build variants that this Qt installation offers.
binPath | `path` | `undefined` | The path in which Qt tools such as `qmake`, `moc` and so on are located.
config | `stringList` | `empty` | Corresponds to the default value of qmake's `CONFIG` variable.
docPath | `path` | `undefined` | The path in which the Qt documentation is located.
frameworkBuild | `bool` | `undefined` | Specifies whether Qt was built as a framework. This is only relevant for Darwin systems.
incPath | `path` | `undefined` | The base path of the Qt headers.
libInfix | `string` | `empty` | 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 `Qt Core` library will be in a file called `libQt5CoreTest.so` instead of the default `libQt5Core.so`.
libPath | `path` | `undefined` | The path in which the Qt libraries are located.
lreleaseName | `string` | `"lrelease"` | The base name of the `lrelease` tool. Set this if your system uses a name such as "lrelease-qt4".
mkspecPath | `path` | `undefined` | The path in which the Qt mkspecs are located.
mocName | `string` | `"moc"` | The base name of the `moc` tool. Set this if your system uses a name such as "moc-qt4".
namespace | `string` | `undefined` | The Qt namespace that can be set at build time via the `configure` script. By default, Qt is not built in a namespace.
pluginPath | `path` | `undefined` | The path in which the Qt plugins are located.
qdocEnvironment | `stringlist` | `undefined` | The environment for calls to `qdoc`. Typically, you will need to set some variables here when running `qdoc` to build your project documentation.
qdocName | `string` | `"qdoc3"` for Qt 4, `"qdoc"` otherwise | The base name of the `qdoc` tool.
qdocQhpFileName | `string` | `undefined` | Controls which name the `qhp` file gets when generating documentation with `qdoc`.
qtBuildVariant | `string` | See 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.
qtConfig | `stringList` | `empty` | Corresponds to the default value of qmake's `QT_CONFIG` variable.
staticBuild | `bool` | `undefined` | Specifies whether Qt was built statically.
version | `string` | `undefined` | The Qt version. Consists of three numbers separated by dots, for instance "5.1.1".
versionMajor | `int` | `versionParts[0]` | The Qt major version.
versionMinor | `int` | `versionParts[1]` | The Qt minor version.
versionParts | `list` | `empty` | The Qt version as a list. For instance, Qt version 5.1.1 would correspond to a value of `[5, 1, 1]`.
versionPatch | `int` | `versionParts[2]` | The Qt patch level.

## declarative Properties

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

## gui Properties

Property | Type | Default | Description
--- | --- | --- | ---
uicName | `string` | `"uic"` | The base name of the `uic` tool. Set this if your system uses a name such as "uic-qt4".

## quick Properties

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