# 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.

#### binPath

Type: | `path`
Default: | `undefined`

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

#### buildVariant

Type: | `stringList`
Default: | `undefined`

Specifies the build variants for which Qt was built.

#### config

Type: | `stringList`
Default: | `empty`

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

#### docPath

Type: | `path`
Default: | `undefined`

The path in which the Qt documentation is located.

#### frameworkBuild

Type: | `bool`
Default: | `undefined`

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

#### incPath

Type: | `path`
Default: | `undefined`

The base path of the Qt headers.

#### libInfix

Type: | `string`
Default: | `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

Type: | `path`
Default: | `undefined`

The path in which the Qt libraries are located.

#### lreleaseName

Type: | `string`
Default: | `"lrelease"`

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

#### mkspecPath

Type: | `path`
Default: | `undefined`

The path in which the Qt mkspecs are located.

#### mocName

Type: | `string`
Default: | `"moc"`

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

#### namespace

Type: | `string`
Default: | `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

Type: | `path`
Default: | `undefined`

The path in which the Qt plugins are located.

#### qdocEnvironment

Type: | `stringlist`
Default: | `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

Type: | `string`
Default: | `"qdoc3"` for Qt 4, `"qdoc"` otherwise

The base name of the `qdoc` tool.

#### qdocQhpFileName

Type: | `string`
Default: | `undefined`

Controls which name the `qhp` file gets when generating documentation with `qdoc`.

#### qtConfig

Type: | `stringList`
Default: | `empty`

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

#### staticBuild

Type: | `bool`
Default: | `undefined`

Specifies whether Qt was built statically.

#### version

Type: | `string`
Default: | `undefined`

The Qt version. Consists of three numbers separated by dots, for instance "5.1.1".

#### versionMajor

Type: | `int`
Default: | `versionParts[0]`

The Qt major version.

#### versionMinor

Type: | `int`
Default: | `versionParts[1]`

The Qt minor version.

#### versionParts

Type: | `list`
Default: | `empty`

The Qt version as a list. For instance, Qt version 5.1.1 would correspond to a value of `[5, 1, 1]`.

#### versionPatch

Type: | `int`
Default: | `versionParts[2]`

The Qt patch level.

### declarative Properties

#### qmlDebugging

Type: | `bool`
Default: | `false`

Specifies whether QML debugging support should be compiled into your binaries.

#### qmlImportsPath

Type: | `string`
Default: | set by `qbs-setup-qt`

The absolute path to the directory where Qt's QML imports are installed.

#### qmlPath

Type: | `string`
Default: | 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

#### uicName

Type: | `string`
Default: | `"uic"`

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

### quick Properties

#### qmlDebugging

Type: | `bool`
Default: | `false`

Specifies whether QML debugging support should be compiled into your binaries.

#### qmlImportsPath

Type: | `string`
Default: | set by `qbs-setup-qt`

The absolute path to the directory where Qt's QML imports are installed.

#### qmlPath

Type: | `string`
Default: | set by `qbs-setup-qt`

The absolute path to the directory where Qt's QML files are installed. This property is undefined for Qt4.