- Configuring Qt Creator
- Checking Build and Run Settings
- Changing Keyboard Shortcuts
- Changing Color Schemes
- Adding Your Own Code Snippets
- Configuring Version Control Systems
- Managing Plugins
- Enabling and Disabling Plugins
- Installing Plugins
- Specifying Build Settings
- Managing Build Configurations
- Editing Build Configurations
- Building on Remote Devices
- Starting External Processes
- Build Steps
- Adding Custom Build Steps
- Executing Custom Commands
- Clean Steps
Configuring Qt Creator
If you install Qt Creator as part of a Qt installation, you should be able to use it out-of-the-box, with the default settings and configuration options. However, if you install the stand-alone Qt Creator package, build Qt Creator from sources, or install several Qt versions, you may need to tell Qt Creator where to find the Qt versions and compilers by adding the paths to them and by creating kits that use them. To make Qt Creator behave more like your favorite code editor or IDE, you can change the settings for keyboard shortcuts, color schemes, generic highlighting, code snippets, and version control systems. In addition, you can enable and disable Qt Creator features by managing plugins. The following sections summarize the options that you have and point you to detailed information to help you specify any required settings and to make using Qt Creator a better experience for you.
Checking Build and Run Settings
Qt Creator is an integrated development environment (IDE) that you can use to develop Qt applications. While you can use the Qt Installer to install Qt Creator, the stand-alone Qt Creator installer never installs Qt or any Qt tools, such as qmake. To use Qt Creator for Qt development, you also need to install a Qt version and a compiler. If you update the compiler version later, you can register it into Qt Creator. The Qt Installer attempts to auto-detect compilers and Qt versions. If it succeeds, the relevant kits will automatically become available in Qt Creator. If it does not, you must add the kits yourself to tell Qt Creator where everything is. To add kits, select Edit > Preferences > Kits > Add. For more information, see Adding Kits. Each kit consists of a set of values that define one environment, such as a device, compiler, and Qt version. If Edit > Preferences > Kits > Qt Versions does not show all the installed Qt versions, select Link with Qt. If Auto-detected still does not show the Qt version, select Add to add it manually. For more information, see Adding Qt Versions. Also check that Edit > Preferences > Kits > Compilers shows your compiler. For more information, see Adding Compilers. You can connect devices to the development PC to run, debug, and analyze applications on them from Qt Creator. You can connect the device to the development PC via USB. Additionally, you can connect Linux-based devices over a WLAN. You must also configure a connection between Qt Creator and the development PC and specify the device in a kit. To add devices, select Edit > Preferences > Devices > Devices > Add. For more information, see Connecting Devices.
Changing Keyboard Shortcuts
You can use Qt Creator with your favorite keyboard shortcuts. To view and edit all keyboard shortcuts defined in Qt Creator, select Edit > Preferences > Environment > Keyboard. For more information, see Keyboard Shortcuts.
Changing Color Schemes
Themes enable you to customize the appearance of the Qt Creator UI: widgets, colors, and icons. To switch themes, select Edit > Preferences > Environment, and then select a theme in the Theme field. You can use the Qt Creator text and code editors with your favorite color scheme that defines how to highlight code elements and which background color to use. You can select one of the predefined color schemes or create custom ones. The color schemes apply to highlighting C++ files, QML files, and generic files. To change the color scheme, select Edit > Preferences > Text Editor > Fonts & Color. For more information, see Defining Color Schemes. KSyntaxHighlighting offers generic highlighting. It is the syntax highlighting engine for Kate syntax definitions. Qt Creator comes with most of the commonly used syntax files, and you can download additional files. To download and use highlight definition files, select Edit > Preferences > Text Editor > Generic Highlighter. For more information, see Generic Highlighting.
Adding Your Own Code Snippets
As you write code, Qt Creator suggests properties, IDs, and code snippets to complete the code. It lists context-sensitive suggestions for the statement currently under your cursor. You can add, modify, and remove snippets in the snippet editor. To open the snippet editor, select Edit > Preferences > Text Editor > Snippets. For more information, see Editing Code Snippets.
Configuring Version Control Systems
Qt Creator supports several version control systems. In most cases, you do not need to configure the version control in any special way to make it work with Qt Creator. However, some configuration options are available and you can set them in Edit > Preferences > Version Control > General. For more information about the supported functions, see Using Version Control Systems.
Managing Plugins
Qt Creator comes with a set of plugins, some of which are disabled by default. You can enable disabled plugins if you need them and disable plugins you don’t need. You can download and install additional plugins from Qt Marketplace or some other source, such as GitHub.
Enabling and Disabling Plugins
New Qt Creator plugins are often introduced as experimental plugins to let you try them out before they are fully supported. Experimental plugins are disabled by default and you must enable them for them to become visible after you restart Qt Creator. By default, all the plugins that the plugin depends on are also enabled. You can also disable plugins that you do not use, to streamline Qt Creator. By default, all the plugins that depend on the plugin are also disabled. To enable and disable plugins, select Help > About Plugins.
Installing Plugins
Qt Marketplace has links to Qt Creator plugins that you can download and install either for free or for a price set by their publisher. You can browse the available plugins in the Marketplace tab in the Welcome mode.
To install plugins:
- Select Help >About Plugins >Install Plugins.
- In the Source dialog, enter the path to the archive or library that has the plugin.
- In the Install Location dialog, select User plugins to make the plugin available for the current user in all compatible Qt Creator instances or Qt Creator installation to make the plugin available for all users of a particular Qt Creator instance.
- In the Summary dialog, select Finish to install the plugin.
- Select Restart Now to restart Qt Creator and load the plugin.
© 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.
Specifying Build Settings
Different build configurations allow you to quickly switch between different build settings. By default, Qt Creator creates debug, release, and profile build configurations. A debug build has additional debug symbols that you need for debugging the application but that you can leave out from the release version. Generally, you use the debug configuration for testing and the release configuration for creating the final installation binary package. If you selected CMake as the build system for the project, you can use a minimum size release build configuration to create the final installation binary package. It is a release build that makes the size of the binary package as small as possible, even if this makes the application slower. A profile build (which is called release with debug information when using CMake) is an optimized release build that is delivered with separate debug information. It is best suited for analyzing applications.
Managing Build Configurations
Specify build settings in Projects > Build & Run > Build > Build Settings. To add a new build configuration, click Add and select the type of configuration you would like to add. The options you have depend on the build system that you selected for the project. You can add as many build configurations as you need. You can also select Clone to add a build configuration that is based on the currently selected one. Select Rename to give the currently selected build configuration a new name. To delete the build configuration currently selected, click Remove.
Editing Build Configurations
This topic describes the build settings at a general level.
For more information about debugging Qt Quick projects, see Setting Up QML Debugging.
Building on Remote Devices
You can build applications on remote Linux or Docker devices if you have kits that specify the devices and toolchains to use. When the build device of the kit is a remote device, such as a remote Linux or Docker device, the Browse button next to the Build directory field shows options for selecting remote directories.
Also, the Open Terminal button in the Build Environment section opens a terminal on the device.
Starting External Processes
Qt Creator executes external processes to accomplish tasks such as building and running applications. To execute the processes, Qt Creator uses shell commands that are native to the system. It constructs the commands from an executable name and optional command line arguments.
The executable name is specified in the executable fields: qmake, Make, Command, or Executable. It is either derived from the project or specified manually. When you specify executables manually, you can reference environment variables and Qt Creator variables. However, no quoting rules apply.
You can specify command-line arguments in the arguments fields: Arguments, Additional arguments, CMake arguments, Command arguments, Default arguments, Extra arguments, Make arguments, or Tool arguments. You can create shell command lines that can have redirection and other advanced constructs. However, some more complex use cases, such as piping test data into the application being tested or grouping commands, are not supported because the value of the Executable field is always placed first when constructing the command.
You can use environment variables as values in the fields. In addition, you can use Qt Creator variables in arguments, executable paths, and working directories.
Build Steps
In Build Steps, you can change the settings for the build system selected for building the project:
You can use IncrediBuild to accelerate the build process when using qmake or CMake.
Adding Custom Build Steps
To add custom steps to the build settings, select Add Build Step > Custom Process Step.
By default, custom steps are enabled. To disable a custom step, select the (Disable) button.
Executing Custom Commands
To execute custom commands when building for embedded devices, select Add Build Step > Custom Remote Command (via adb shell) (commercial only) and enter the command to execute.
Clean Steps
You can use the cleaning process to remove intermediate files. This process might help you to fix obscure issues during the process of building a project using:
You can define the clean steps for your builds in Clean Steps.
- To add a clean step using make or a custom process, click Add Clean Step and select the type of step you want to add. By default, custom steps are enabled. To disable a custom step, select the Disable button.
- To remove a clean step, click Remove Item.
- To change the order of steps, click (Move Up) and (Move Down).
© 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.