- Qt Creator Documentation
- Configure projects for running
- Qt Creator 18.0.0-beta1

How To

# Configure projects for running

Specify settings for running applications on the Run device that you select for a kit in Projects > Build & Run > Run > Run Settings.

The available run settings depend on the type of the project and the device:

- Android
- Boot to Qt
- Desktop
- Python
- QNX
- Remote Linux

## Manage run configurations

The available run configurations are listed in the Run configuration field. Each run configuration belongs to a particular build configuration, so switching the active build configuration also switches the set of available run configurations. You can specify run settings, such as command line arguments or environments, separately for each build configuration, such as Debug or Release.

To add run configurations for a build configuration, select Add.

To add a run configuration that is based on the current one, select Clone.

To copy the values from another run configuration into the current one, even if it belongs to another build configuration, select Clone into This.

To rename the current run configuration, select Rename.

To remove the current run configuration, select Remove. To remove all run configurations that belong to a build configuration, select Remove All.

### qmake run configurations

The run configurations for qmake projects derive their executable from the parsed .pro files. For more information on how the commands are constructed, see Start external processes.

## Select the default run target

If a project has multiple executables, you need to tell Qt Creator which one it should run.

### CMake run targets

When using CMake, you can filter the run target list by setting `qtc_runnable` as the value of the `FOLDER` property in the `CMakeLists.txt` file for the project. For example:

     set_target_properties(main_executable PROPERTIES FOLDER "qtc_runnable")

If you do not specify `qtc_runnable` for any project, Qt Creator automatically adds run configurations for all targets specified in `CMakeLists.txt`.

### qmake run targets

When using qmake, you can prevent Qt Creator from automatically creating run configurations for subprojects by specifying the `qtc_runnable` variable in the .pro files of the application projects (`TEMPLATE=app`) that you want to run. For example

     CONFIG += qtc_runnable

If none of your application projects specifies `qtc_runnable`, Qt Creator creates run configurations for all application projects.

If any of your application projects specifies `qtc_runnable`, Qt Creator creates run configurations only for subprojects that also have `CONFIG += qtc_runnable` set in their .pro files.

For more information about qmake project templates, see TEMPLATE.

### Meson run targets

Qt Creator automatically adds run configurations for all targets declared with `executable()` function in Meson build descriptions.

See also Enable debugging, Configuring Projects, Specify a custom executable to run, Specify Valgrind settings for a project, and Reference: Run Configurations.

How To