C

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.

Modifying Qt Build Configuration describes how you can use Qt Configuration Tool to select features that are included in the Qt build configuration. Using Tool with Yocto Builds describes how to use Qt Configuration Tool with the Yocto builds.

Modifying Qt Build Configuration

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

To use Qt Configuration Tool for modifying a Qt build configuration, you must have a 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).

After you have set the build directory, the Configure file (2) field points to the main configure.json file where the Qt features of your build are described. The features and their states are presented in a tree view (3) where you can enable and disable them.

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

Save your changes to the features by selecting File > Save Feature Changes. Your configuration changes are updated to the build's config.opt file. The path of the new configuration appears in the output pane (5) 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:

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