- Qbs Manual
- Command-Line Interface
- setup-qt
- Qbs 3.1.0

# setup-qt

## Synopsis

     qbs setup-qt [--settings-dir <directory>] [--system] --detect
     qbs setup-qt [--settings-dir <directory>] [--system] <path to qmake> <profile name>

## Description

Creates Qbs profiles for Qt installations.

The first form tries to auto-detect all known Qt versions, looking them up via the PATH variable.

The second form creates a profile with the name `<profile name>` for the Qt version located at `<path to qmake>`.

For more information, see Managing Qt Versions.

## Options

### `--detect`

Attempts to auto-detect all known Qt versions, looking them up in the PATH environment variable.

### `--settings-dir <directory>`

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:

- Linux: `$HOME/.config/QtProject/qbs`
- Windows: `%APPDATA%\QtProject\qbs`
- macOS: `$HOME/Library/Preferences/qbs`

### `--system`

If this option is given, the profile(s) created by this tool will end up in the system-level settings and thus be available to all users. Otherwise, they go into the user-level settings.

### `--help|-h|-?`

Displays help for the command.

## Examples

Looks up Qt versions in the PATH and creates profiles for them:

     qbs setup-qt --detect

Creates a profile called `myqt` for the Qt version located in `/usr/bin/qmake`:

     qbs setup-qt /usr/bin/qmake myqt