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.
You can use Qt Configuration Tool for creating a new commercial Qt build configuration.
Create a new Qt build configuration as follows:
- Select File > New configuration.
- Select Qt5 Source directory and browse to the Qt sources.
- Select a new, clean Build directory.
- Select Confirm use of commercial license.
- To see the commercial license agreement, select Show license agreement.
- In 2 - Configuration options, set configure options. For more information about the configure options in Qt, see Qt Configure Options.
- Select Features > Run configure or the Run configure to show feature list button.
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.
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 (
Set the configured Qt build to the tool as follows:
- Select File > Open existing configuration.
- Select the build by using Browse in Build directory. The tool automatically detects Qt5 Source directory.
After you have set the build directory, you find the Qt modules under 1 - Modules selection. In Modules selection, you can view all the Qt modules that are available under the selected source directory. In Modules selection, you can enable or disable the Qt modules that are available in the selected source directory.
Under 2 - Configuration options, you can modify device options, paths, and arguments for your Qt build.
After you have run the configuration, 3 - Features selection lists all the features that are included in the configured modules. In Modules selection, you can enable or disable the Qt modules that are available in the selected source directory.
You can roll back and re-apply feature selections by selecting Features > Undo Feature Selections and Features > Redo Feature Selections.
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. To apply the changes, you must select Features > Run configure or Re-run configuration to apply changes.
The path of the new configuration appears in Logs at the bottom of the tool's view. The Logs section also displays status information, errors, and warnings.
In the terminal, the new configuration file is picked up by
configure when you re-configure your Qt:
In 3 - Features selection, features can be filtered by name and by state.
The filter states in Filter displayed features:
- Default - Shows available features that are documented.
- All - Shows all features, including ones that are not available.
- Available - Shows only features that are available.
- Modified - Shows only the modified features.
An available feature is a feature that can be enabled on a chosen target platform. All libraries it depends on are present and its configuration tests have successfully passed.
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 under 3 - Feature selection, you can export the features as follows:
- Select File > Export Selected Features.
- Browse some folder. You can select any folder you like to.
- Type the file name.
- Select Save.
Import the exported file as follows:
- Set a configured Qt build to Qt Configuration Tool by using Browse in Build directory.
- Select File > Import Selected Features.
- Browse to the exported file.
- 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.
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:
The following table summarizes the available options:
|The path to the Qt build directory. If omitted, it is assumed to be the working directory.|
|The path to the configure.json file. If omitted, the tool tries to derive it from the build directory.|
From the Qt Configuration Tool version 1.2 onwards, you can 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:
- Select your Qt build's build directory.
- Enable and disable the features in 3 - Features selection.
- Select File > Export Features for Boot2Qt.
- 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:
- Create a new recipe extension for the module. For example, qtdeclarative_git.bbappend.
- In the created .bbappend file, add the line
- 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.