qbs config [--settings-dir <directory>] [--user|--system] [--list [<root> ...]] [--unset <key>] [--export <file>] [--import <file>] qbs config [--settings-dir <directory>] [--user|--system] <key> qbs config [--settings-dir <directory>] [--user|--system] <key> <value>
Manages Qbs settings, such as preferences and profiles. You can list all keys and remove the specified key, as well as import settings from a file or export them to a file.
The second form of this command displays the specified
The third form sets the specified
<key> with the specified
There are two sets of settings: The system-level settings affect all users, while the user-level settings are specific to the current user. By default, the read operations consider both sources. If the same key is present in both settings, then for list values, the system value is appended to the user value, while for other types of values the user-level one takes precedence. Write operations go to the user-level settings by default. Use the
--system options to change this behavior.
Note: It is conceivable that the default system value of the
preferences.qbsSearchPaths setting could pull in unwanted Qbs modules, in particular when doing cross-builds. In such a case, you can set
preferences.ignoreSystemSearchPaths to exclude the search paths coming from the system settings. You'll typically do this for a specific profile:
$ qbs config profiles.myprofile.preferences.ignoreSystemSearchPaths true
You can use the config-ui command to open the Qbs Settings tool for managing settings in a hierarchical view.
Reads all settings (such as profile information) from the specified
<directory>. If the directory does not exist, it will be created.
The default value is system-specific. For example:
Lists keys under the key
<root> or all keys if the root is not specified.
Possible values are:
defaultProfileis the default profile to use if a profile is not specified
preferencesaccepts build preferences as second-level keys
profilesaccepts profile names as second-level keys
Removes the specified
Exports settings to the specified
Imports settings from the specified
Causes read operations to display only the user-level settings, while the system-level settings are ignored. Write operations will target the user-level settings, which is also the default.
Read and write operations will consider only the system-level settings.
Displays help for the command.
<key> consists of several levels separated by periods. The first level shows a root value, such as preferences or profiles. The root determines whether the second-level keys are build preferences or profile names. The lower level keys consist of a module name, followed by a property name.
Lists the existing profiles:
qbs config --list profiles
Shows the default profile:
qbs config defaultProfile
Note: If no output is shown, the default profile used is the built-in profile
none, which sets no properties.
Sets the profile called
gcc as the base profile of the Qt profile called
qbs config profiles.myqt.baseProfile gcc
Adds the location of a custom module to your preferences, to make the module accessible in several projects:
qbs config preferences.qbsSearchPaths /usr/local/share/custom-qbs-extensions
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.