Qt Configuration Tool

Qt Configuration Tool is a GUI application for the Qt feature system introduced with Qt 5.8. Qt Configuration Tool is part of the Qt Lite concept that provides features and tools for creating and building smaller Qt binaries. To use the tool, you must have a commercial Qt license.

With Qt Configuration Tool, you can select features, modules, and configure options that are included in the Qt build configuration. Qt Configuration Tool automatically takes care of dependencies between them.

Creating New Qt Build Configuration describes how you create a new Qt build configuration with Qt Configuration Tool. Modifying Qt Build Configuration describes how you can use Qt Configuration Tool to select modules and features that are already included in the Qt build configuration.

Using Tool with Yocto Builds describes how to use Qt Configuration Tool with the Yocto builds.

Creating New Qt Build Configuration

You can use Qt Configuration Tool for creating a new commercial Qt build configuration. For a new configuration, select Source directory of Qt sources, and a new, clean Build directory (1).

It is recommended to use a build directory that is not under the source directory, that is a shadow build directory. With the shadow build, you can keep the Qt sources clean of build artifacts. Also, the shadow build allows you to configure multiple builds from the same Qt sources.

You can modify the modules and configure options as described in Modifying Qt Build Configuration.

Configure your Qt build by selecting Features > Run configure or by pressing Run configure button (2).

Modifying Qt Build Configuration

To use Qt Configuration Tool for modifying a Qt build configuration, you must have a commercially configured Qt build that you then modify with the tool. The Qt build can be either a top-level (qt5) build of Qt, or just Qt Base (qtbase). Set the configured Qt build to the tool by using Browse in Build directory (1). The tool automatically detects Source directory.

After you have set the build directory, you find the Qt modules under Modules (3). Features are listed in a tree view (4). You can can enable and disable the modules and the features by checking and unchecking the check boxes.

You can also modify configure options (5), device options (6), paths (7), and additional arguments (8).

You can roll back and re-apply feature selections with Undo and Redo buttons (2).

Save your changes to the features, modules, and configure options by selecting File > Save. Your configuration changes are updated to the config.opt file in the build directory. The path of the new configuration appears in the output pane at the bottom of the tool's view. The pane also displays status information, errors, and warnings.

The new configuration file is picked up by configure when you re-configure your Qt:

configure -redo

Filtering the Features

The features can be filtered by name and by state.

The filter states in Displayed features (6):

  • Default - Shows available features that are documented.
  • All - Shows all features, including ones that are not available.
  • Available - Shows only features that are available.

Available feature is a feature that can be enabled on the chosen target platform; all libraries it depends on are present and its configuration tests completed successfully.

Exporting and Importing Features

You can export your feature modifications into a single file. Via the exported feature file, you can share your build configuration with other users. You can also use the exported file as a backup copy of your modifications.

After you have enabled and disabled some Qt features on the Qt Configuration Tool's tree view (3), you can export the features as follows:

  1. Select File > Export Selected Features.
  2. Browse some folder. You can select any folder you like to.
  3. Type the file name.
  4. Select Save.

Import the exported file as follows:

  1. Set a configured Qt build to Qt Configuration Tool by using Browse in Build directory (1).
  2. Select File > Import Selected Features.
  3. Browse to the exported file.
  4. Select Open.

When you import the exported file in Qt Configuration Tool, the features are enabled and disabled on the build as defined in the imported file.

Command-line Options

You can also launch Qt Configuration Tool via the command line. In the command line, you must specify both the Qt build directory and the location of the configure.json file that describes the Qt features. By default, the file is searched from the build directory.

To specify command line options for Qt Configuration Tool, enter the following command under <Qt installation directory>/Tools/QtConfigGui:

qconfig-gui [options]

The following table summarizes the available options:

--build-dir <path>The path to the Qt build directory. If omitted, it is assumed to be the working directory.
--json-file <path>The path to the configure.json file. If omitted, the tool tries to derive it from the build directory.

Using Tool with Yocto Builds

The Qt Configuration Tool version 1.2 enables you to export features to Boot to Qt and use them in Yocto builds. The Qt Configuration Tool version 1.2 was released with Qt 5.12 but you can also use it with older Qt versions. However, the Boot to Qt's meta-qt5 layer supports the exported features from Qt 5.12 onwards.

To use Qt Configuration Tool with the Yocto builds, you must have a Qt build that is configured with a commercial Qt license. This build cannot be the one that is provided by Yocto. Instead, you must configure Qt yourself for your target device.

Launch the tool and export features from a Qt build to Boot to Qt as follows:

  1. Select your Qt build's build directory (1).
  2. Enable and disable the features in the tree view (3).
  3. Select File > Export Features for Boot2Qt.
  4. Browse a directory and select Choose.

The selected folder contains one feature file for each Qt module that has feature flags configured.

In your Yocto build, do the following actions for each module that you have the feature file for:

  1. Create a new recipe extension for the module. For example, qtdeclarative_git.bbappend.
  2. In the created .bbappend file, add the line inherit qt5-features.
  3. Put the module's feature file, for example, qtdeclarative.opt, under a features/ next to your .bbappend file.

If your build is based on the Boot to Qt image, run the build on a command line with the bitbake b2qt-embedded-qt5-image command.

Available under certain Qt licenses.
Find out more.