Setting Up Qbs
To use Qbs to build a project, you must create a .qbs file for the project. You can use Qt Creator to create a C or C++ project that is built with Qbs. For more information about Qbs, see the Qbs Manual.
The application is built using the default Qbs profile that is associated with the build and run kit. Qt Creator automatically creates a Qbs profile for each kit. You can edit the build profiles by adding new keys and values.
To check which Qbs version is being used, select Tools > Options > Qbs > Version Info.
If you build Qt Creator yourself from the Qt Creator Git repository, you also need to fetch the Qbs submodule to get Qbs support:
- Fetch the Qbs submodule in your Qt Creator git checkout with
git submodule update --init.
- Run qmake on Qt Creator and build Qt Creator again.
Editing Build Profiles
You can modify a build profile that is associated with a build and run kit by editing the values of the keys generated by Qt Creator and by adding new values:
- Select Tools > Options > Qbs.
- By default, Qbs profiles are stored in the
qbsdirectory in the Qt Creator settings directory to ensure that different Qt Creator instances do not overwrite each other's profiles. If you only run one Qt Creator instance, you can store the profiles in the Qbs settings directory instead, by deselecting the Store profiles in Qt Creator settings directory check box.
- In the Kit field, select a build and run kit.
- Select Edit to edit the profile associated with the kit.
- Select Add to add keys and values to the profile or to modify existing values.
- In the Key column, spefify the key to add or modify as:
- In the Value column, specify a value as a JSON literal.
- Click OK.
The values that you have modified are displayed in red in the Profile properties field.
For a list of available keys and values, see the List of Modules in the Qbs Manual.
© 2017 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.