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 Preferences > Qbs > General.

Building Qbs

If you build Qt Creator yourself from the Qt Creator Git repository, you also need to fetch the Qbs submodule to get Qbs support:

  1. Fetch the Qbs submodule in your Qt Creator git checkout with git submodule update --init.
  2. Run qmake on Qt Creator and build Qt Creator again.

Specifying Qbs Settings

By default, Qbs profiles are stored in the qbs directory 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.

To specify settings for Qbs:

  1. Select Preferences > Qbs.

    "Qbs preferences"

  2. Deselect the Use Qt Creator settings directory for Qbs check box to store Qbs profiles in the Qbs settings directory.
  3. In the Path to qbs executable field, you can view and change the path to the Qbs executable. The Qbs version field displays the version number of the executable.
  4. In the Default installation directory field, you can view and change the Qbs installation directory.
  5. Select the Profiles tab to specify settings for Qbs profiles.

    "Qbs Profiles tab"

  6. In the Kit field, select a build and run kit to view the properties of the associated profile. To modify the properties, select Preferences > Kits. For more information, see Edit Qbs profiles.

© 2023 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.