Qt Creator Manual

Acknowledgements

Credits

Qbs

Third-party Components

Adding Compilers

Redetecting Compilers

Specifying Compiler Settings

Adding Nim Compilers

Adding Custom Compilers

Troubleshooting MinGW Compilation Errors

Adding Debuggers

Adding Kits

Filtering Kit Settings

Specifying Kit Settings

Editing Qbs Profiles

Adding Libraries to Projects

To Add Libraries

Example of Adding Internal Libraries

Adding New Custom Wizards

Wizard Types

Locating Wizards

Tips for Wizard Development

Mapping Actions to Keyboard Shortcuts

Verbose Output

Integrating Wizards into Builds

Using Variables in Wizards

Localizing Wizards

Creating Wizards

Values Available to the Wizard

Available Pages

Field Page

File Page

Form Page

Kits

Project

Summary

VcsCommand

VcsConfiguration

Available Widgets

Check Box

List

Label

Line Edit

Path Chooser

Spacer

Text Edit

Available Generators

File Generator

Scanner Generator

Adding Qt Designer Plugins

Locating Qt Designer Plugins

Configuring Qt Designer Plugins on macOS

Matching Build Keys

Adding Qt Versions

Registering Installed Qt Versions

Setting Up New Qt Versions

Registering Documentation

Troubleshooting Qt Installations

Minimum Requirements

AdoptOpenJDK

Advanced Use

Related Topics

All Topics

Analyzing CPU Usage

Using the Performance Analyzer

Profiling Memory Usage on Devices

Specifying Performance Analyzer Settings

Choosing Event Types

Choosing a Sampling Mode and Period

Selecting Call Graph Mode

Setting Stack Snapshot Size

Adding Command Line Options For Perf

Resolving Names for JIT-compiled JavaScript Functions

Analyzing Collected Data

Selecting Event Ranges

Understanding the Data

Viewing Statistics

Visualizing Statistics as Flame Graphs

Interaction between the views

Loading Perf Data Files

Loading and Saving Trace Files

Troubleshooting

Analyzing Code

Analyzing Code with Cppcheck

Enabling the Cppcheck Plugin

Running Cppcheck on Selected Files

Android Application Fundamentals

Android NDK

Android OpenSSL support

Android SDK Command-line Tools

Applying Refactoring Actions

Creating Functions

Implementing Member Functions

Inserting Virtual Functions

Creating Getters and Setters

Generating Constructors

Specifying Settings for Refactoring Actions

Function Locations

Function Names and Attributes

Namespace Handling

Custom Parameter Types

Summary of Refactoring Actions

Refactoring C++ Code

Refactoring QML Code

Beautifying Source Code

Browsing Project Contents

Viewing Defined Types and Symbols

Viewing the Class Hierarchy

Viewing Type Hierarchy

Viewing Include Hierarchy

Build Systems

Building Applications for the Web

Requirements

Setting Up the Development Environment

Setting Up Qt for WebAssembly

Enabling the WebAssembly Plugin

Specifying WebAssembly Settings

Adding WebAssembly Kits

Running Applications in a Web Browser

Building and Running

Related Topics

Building and Running an Example

Building for Multiple Platforms

Additional Build Commands

Building with CMake

Building with qmake

CMake Build Configuration

Multi-Config Support

Modifying Initial Parameters

Re-configuring with Initial Parameters

Viewing CMake Output

CMake Build Steps

Using Ninja as a CMake Generator

Using CMake with Conan

CMake Clean Steps

CMake: CMAKE_OSX_DEPLOYMENT_TARGET

CMake: HEADER_FILE_ONLY

CMake: install command

CMake: set_property command

CMake: target_compile_definitions command

CMake: target_link_libraries command

CMake: target_sources command

Checking Code Syntax

Viewing Annotations

Specifying Line Annotation Positions

JavaScript and QML Error Codes

Resetting the Code Model

Inspecting QML and JavaScript

Automatically Formatting QML/JS Files

Coding

Related Topics

Collecting Usage Statistics

Specifying Telemetry Settings

Commercial Features

Comparing Files

Viewing the Changes

Changing the Colors

Completing Code

Specifying Completion Settings

Summary of Available Types

Completing Code Snippets

Editing Code Snippets

Adding and Editing Snippets

Removing Snippets

Resetting Snippets

Completing Nim Code

Conan Build Configuration

Conan Build Steps

Configure on-device developer options

Configuring Projects

Activating Kits for a Project

Specifying Settings

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

Configuring the Editor

Related Topics

Connecting Android Devices

Requirements

Specifying Android Device Settings

Manual Setup

Viewing Android Tool Chain Settings

Managing Android NDK Packages

Managing Android SDK Packages

Managing Android Virtual Devices (AVD)

Creating a New AVD

Debugging on Android Devices

Connecting Bare Metal Devices

Enabling the Bare Metal Device Plugin

Specifying Settings for Debug Server Providers

EBlink

J-Link

OpenOCD

St-Link

uVision IDE

uVision Simulator

uVision St-Link Debugger

Adding Bare Metal Devices

Building for and Running on Bare Metal Devices

Connecting Boot2Qt Devices

Enabling the Boot2Qt Plugin

Adding Boot2Qt Devices

Flashing Boot2Qt Devices

Configuring Connections

Connecting Devices

Related Topics

Connecting Generic Remote Linux Devices

Configuring SSH Connections

Generating SSH Keys

Managing Device Processes

Connecting MCUs

Requirements

Setting Up the Development Environment

MCU Plugin

Specifying MCU Settings

Adding MCU Devices

Managing MCU Kits

Running Applications on MCUs

Supported Qt for MCUs SDKs

Connecting QNX Devices

Adding a QNX Neutrino Device in Qt Creator

Adding Kits for QNX Devices

Connecting iOS Devices

Configuring Devices

Viewing Device Connection Status

Specifying Supported iOS Versions

Testing on Simulator

Managing Simulators

Checking Current Xcode Version

Converting UI Projects to Applications

Converting into qmake Projects

Handling Large Data Files

Adding Custom Fonts

Adding Qt Quick Designer Components to Qt Installations

Adding Qt Quick Timeline Module to Qt Installations

Creating Optimized 3D Scenes

Creating Optimized 3D Scenes

Creating Optimized 3D Scenes

Creating Optimized 3D Scenes

Creating Projects

Selecting the Build System

Using Project Wizards

Selecting Project Type

Creating Widget-Based Qt for Python Applications

Adding Files to Projects

Creating C++ Classes

Creating Resource Files

Creating OpenGL Fragment and Vertex Shaders

Displaying Additional File Types in Projects View

CMake Projects

qmake Projects

Adding Subprojects to Projects

CMake Projects

qmake Projects

Binding Keyboard Shortcuts to Wizards

Related Topics

Creating Qt Quick Projects

Creating Qt Quick Applications

Creating Qt Quick Based Python Applications

Creating Qt Quick UI Projects

Creating a Mobile Application

Setting up the Development Environment

Creating the Project

Adding Images as Resources

Creating the Accelbubble Main View

Locking Device Orientation

Adding Dependencies

Running the Application

Creating a Qt Quick Application

Creating the Project

Deploying Applications

Creating Custom QML Types

Connecting Mouse Clicks to State Changes

Adding Page to the Main View

Animating Transitions

Creating a Qt Widget Based Application

Creating the Text Finder Project

Filling in the Missing Pieces

Designing the User Interface

Completing the Header File

Completing the Source File

Creating a Resource File

Compiling and Running Your Program

Customizing the Build Process

Debugging

Debugging Qt Quick Projects

Setting Up QML Debugging

Mixed C++/QML Debugging

Starting QML Debugging

Debugging JavaScript Functions

Inspecting Items

Inspecting User Interfaces

Executing JavaScript Expressions

Applying QML Changes at Runtime

Debugging a C++ Example Application

Debugging a Qt Quick Example Application

Deploying Applications to Android Devices

Packaging Applications

Specifying Deployment Settings

Specifying Settings for Packages

Selecting API Level

Building AABs

Signing Android Packages

Adding External Libraries

Editing Manifest Files

Package Names

Styling

Screen Orientation

Icons and Splash Screens

Android Manifest Editor

Deploying Applications to Boot2Qt Devices

Launching Applications on Boot

Deploying Applications to Generic Remote Linux Devices

Adding Missing Files

CMake

qmake

Deploy Steps

Finding Configured Devices

Checking for Free Disk Space

Uploading Files

Creating a Tarball

Deploying Applications to QNX Neutrino Devices

Deploying to Devices

Designing User Interfaces

Desktop Platforms

Linux

macOS

Windows

Compiling from Source

Detecting Memory Leaks with Heob

Specifying Heob Settings

Recording Results

Handling Exceptions

Raising Exceptions on Errors

Protecting Pages

Handling Leak Data

Detecting Memory Leaks with Memcheck

Selecting Options for Memory Analysis

Showing Reachable and Indirectly Lost Blocks

Suppressing Errors

Developing Qt Quick Applications

Developing Widget Based Applications

Code Editor Integration

Managing Image Resources

Specifying Settings for Qt Designer

Previewing Forms Using Device Skins

Adding Widgets

Editing MIME Types

Editing State Charts

Creating State Charts

Managing States

Managing Transitions

Adding Executable Content

Embedded Platforms

Bare Metal

Boot2Qt

Generic Remote Linux

Microcontroller Units (MCU)

QNX

FAQ

General Questions

Qt Designer Integration Questions

QML and Qt Quick Questions

Help Questions

Debugger Questions

Compiler Questions

Qt Installation Questions

Platform Related Questions

Questions about New Features

File System

File System Context Menu

File System View Toolbar

Finding

Finding and Replacing

Advanced Search

Enabling Silver Searcher

Getting Help

Related Topics

Getting Started

Getting Started on NXP

Getting Started on Renesas

Getting Started on STM

Getting Started on Windows

Glossary

How-tos

Switch between modes

Move between open files

Switch to Edit mode

Find a specific setting

Open output panes

Find keyboard shortcuts

Run Qt Creator from the command line

Show and hide sidebars

Move to symbols

Inspect signal-slot connections while debugging

Display low-level data in the debugger

See the value of variables in tooltips while debugging

Quickly locate files using the keyboard

Perform calculations

Jump to a function in QML code

Add a license header template for C++ code

Paste text from my clipboard history

Sort lines alphabetically

Enclose selected code in curly braces, parentheses, or double quotes

Select the enclosing block in C++

Add my own code snippets to the auto-complete menu

Quickly write down notes somewhere

Configure the amount of recent files shown

Search and replace across files using a regular expression

IDE Overview

IncrediBuild Build Configuration

IncrediBuild Build Steps

Distribution Control Settings on Linux

Distribution Control Settings on Windows

IncrediBuild Clean Steps

Indenting Text or Code

Specifying Indentation Settings

Indenting C++ Files

Automatic Formatting and Indentation

Indenting QML Files

Indenting Nim Files

Indenting Other Text Files

Specifying Tab Settings

Specifying Tabs and Indentation

Specifying Typing Options

Specifying Settings for Content

Specifying Settings for Braces

Specifying Settings for Switch Statements

Specifying Alignment

Binding Pointers and References

Interacting with the Debugger

Using the Debugger

Stepping Into Code

Customizing Debug Views

Setting Breakpoints

Adding Breakpoints

Specifying Breakpoint Settings

Moving Breakpoints

Deleting Breakpoints

Enabling and Disabling Breakpoints

Setting Data Breakpoints

Viewing Call Stack Trace

Local Variables and Function Parameters

Evaluating Expressions

Inspecting Basic Qt Objects

Directly Interacting with Native Debuggers

Debugging C++ Based Applications

Starting the Debugger from the Command Line

Stepping into Frameworks in macOS

Viewing Threads

Viewing Modules

Viewing Source Files

Viewing Disassembled Code

Viewing and Editing Register State

Specifying Debugger Settings

Mapping Source Paths

Specifying GDB Settings

Specifying Extended GDB Settings

Specifying CDB Settings

Setting CDB Paths on Windows

Keyboard Shortcuts

Configuring Keyboard Shortcuts

Default Keyboard Shortcuts

General Keyboard Shortcuts

Editing Keyboard Shortcuts

Emacs Shortcuts

Image Viewer Shortcuts

Debugging Keyboard Shortcuts

Project Keyboard Shortcuts

Help Keyboard Shortcuts

Version Control Keyboard Shortcuts

Known Issues

General Issues

Editing Issues

Projects Issues

Debugging Issues

Launching the Debugger

Launching the Debugger in Different Modes

Launching in Start Internal Mode

Launching in Start External Mode

Launching in Attach Mode

Attaching to Running Applications

Attaching to Processes when They Start

Launching in Core Mode

Launching in Post-Mortem Mode

Remote Debugging

Using GDB

Using CDB

Managing Data Collection

Principles of Data Collection

Managing Projects

Related Topics

Managing Sessions

Meson Build Configuration

Meson Build Steps

Meson Clean Steps

Mobile Platforms

Android

iOS

Universal Windows Platform (UWP)

Modeling

Using the Model Editor

Creating Models

Creating Package Diagrams

Creating Class Diagrams

Adding Relations

Specifying Members

Creating Component Diagrams

Adding Custom Elements

Open Documents

Specifying Settings for Opening Files

OpenJDK

Opening Projects

Optimizing Applications for Mobile Devices

Optimizing Designs

Overview - QML and C++ Integration

Parsing C++ Files with the Clang Code Model

About the Clang Code Model

Configuring Clang Code Model

Configuring clangd

Clang Checks

Specifying Clang Code Model Settings at Project Level

Using Compilation Databases

Pasting and Fetching Code Snippets

Specifying Settings for Code Pasting

Using Code Pasting Services

Previewing in Browsers

Previewing on Desktop

Previewing on Devices

Previewing on Boot2Qt Devices

Profiling Function Execution

Building Apps for Profiling

Collecting Data

Viewing Collected Data

Selecting Profiling Options

Enabling Full Cache Simulation

Enabling Branch Prediction Simulation

Profiling QML Applications

Using QML Profiler

Specifying Flushing Settings

Attaching to Running Qt Quick Applications

Analyzing Collected Data

Selecting Event Ranges

Understanding the Data

Analyzing Scene Graph Events

Viewing Statistics

Visualizing Statistics as Flame Graphs

Projects

Projects View Context Menu

Projects View Toolbar

QML Import Path

Qbs Build Configuration

Qbs Build Steps

Qbs Clean Steps

Qt Application Manager

Qt Creator Manual

Qt Design Studio Manual

Qt for MCUs

Qt for MCUs - All QML Types

Qt for MCUs - Supported Target Platforms

Refactoring

Finding Symbols

Finding QML Types

Viewing Search Results

Renaming Symbols

Multi-Cursor Editing

Running Autotests

Build System Based Tests

Creating Tests

Creating Qt and Qt Quick Tests

Creating Google Tests

Creating Boost Tests

Creating Catch2 Tests

Creating CTest Based Tests

Setting Up the Google C++ Testing Framework

Building and Running Tests

Selecting Tests to Run

Running and Debugging Tests from Code Editor

Specifying Test Settings

Specifying Settings for Running Qt Tests

Specifying Settings for Running Google Tests

Specifying Settings for Running Boost Tests

Specifying Settings for Running Catch2 Tests

Specifying Settings for Running CTest-Based Tests

Viewing Test Output

Running Valgrind Tools on External Applications

Running on Multiple Platforms

Running on Generic Remote Linux Devices

Running on QNX Devices

Troubleshooting Errors

Debug Output Cannot Be Shown

Cannot Run, Debug, or Stop Applications

Running Python Projects

Searching with the Locator

Using Locator Filters

Configuring Locator Filters

Adding Web Search Engines

Creating Locator Filters

Configuring Locator Cache

Executing JavaScript

Selecting Modes

Semantic Highlighting

Generic Highlighting

Highlighting and Folding Blocks

Setting Up CMake

Adding CMake Tools

Editing CMake Configuration Files

Adding External Libraries to CMake Projects

Related Topics

Setting Up Conan

Setting Up Debugger

Supported Native Debugger Versions

Supported GDB Versions

Supported CDB Versions

Supported LLDB Versions

Installing Native Debuggers

GDB

Debugging Tools for Windows

Debugging Tools for macOS

LLDB

Setting up FSF GDB for macOS

Setting Up IncrediBuild

Setting Up Meson

Adding Meson Tools

Editing Meson Build Descriptions

Code Completion and External Libraries

Current Meson Support Limitations

Related Topics

Setting Up Nimble

Setting Up the Development Environment

Creating Nimble Applications

Setting Up Qbs

Building Qbs

Specifying Qbs Settings

Related Topics

Setting Up a Generic Project

Importing a Generic Project

Working with Generic Project Files

Specifying Files

Specifying Include Paths and Framework Paths

Specifying Defines

Forwarding Flags to Clang Code Model

Providing Deployment Information

Creating a Run Configuration

Setting Up an Autotools Project

Sharing Project Settings

Creating Shared Settings File

Updating Shared Settings

Showing Task List Files in Issues Pane

Managing Task List Entries

Task List File Format

Specifying Build Settings

Managing Build Configurations

Editing Build Configurations

Starting External Processes

Build Steps

Adding Custom Build Steps

Executing Custom Commands

Clean Steps

Specifying Code Style Settings

Specifying Dependencies

Specifying Editor Settings

Specifying Environment Settings

Batch Editing

Clearing the System Environment

Using Environment Variables

Using Qt Creator Variables

Specifying Run Settings

Managing Run Configurations

Selecting Default Run Target

CMake Run Targets

qmake Run Targets

Meson Run Targets

Specifying Run Settings for Desktop Device Types

Specifying Valgrind Settings

Enabling Debugging

Specifying Run Settings for Android Devices

Specifying Run Settings for Linux-Based Devices

Specifying Run Settings for QNX Devices

Specifying Run Settings for Boot2Qt Devices

Selecting the Run Environment

Specifying a Custom Executable to Run

Specifying Run Settings for Qt Quick UI Projects

Specifying Run Settings for Python Projects

Specifying Text Editor Settings

Configuring Fonts

Defining Color Schemes

Exporting and Importing Color Schemes

File Encoding

Start the emulator from the command line

Supported Platforms

Technical Support

Testing

Troubleshooting Debugger

Cannot Launch Debugger

Debugger Does Not Hit Breakpoints

Debugger Does Not Work

Pointer Variable Members Are Not Displayed Directly

Structure Members Are Not Sorted According to Structure Layout

Built-in Debugger Is Slow During Startup and Runtime

Debugger Cannot Attach to Running Process on Linux

Tutorials

UI Files

Supported Methods

JavaScript Functions

Qt QML Methods

User Interface

For macOS Users

Switching UI Themes

Changing Languages

High DPI Scaling

Navigating with Keyboard

Useful Features

Viewing Images

Exporting SVG Images

Location of Settings Files

Using Bazaar

Uncommitting Revisions

Using CVS

Using Clang Tools

Running Clang Tools

Configuring Clang Tools

Selecting Clazy Check Levels

Creating Clang-Tidy Configuration Files

Using ClearCase

Using GNU Diffutils with ClearCase

Checking out and Checking in

Using Command Line Options

Using Custom Styles

Using Custom Output Parsers

Specifying Settings for Custom Output Parsers

Activating Custom Output Parsers

Using Debugging Helpers

Extending Debugging Helpers

Customizing Built-In Debugging Helpers

Adding Custom Debugging Helpers

Debugging Helper Overview

Debugging Helper Implementation

Dumper Class

Dumper.Type Class

Dumper.Field Class

Dumper.Value Class

Children and SubItem Class

Using External Tools

Using Qt Linguist

Running QML Files

Using External Text Editors

Configuring External Tools

Using FakeVim Mode

Supported Modes and Commands

Normal and Visual Modes

Command Line Mode

Plugin Emulation

Insert Mode

Options

Vimrc Example

Mapping FakeVim Commands

Specifying FakeVim Options

Quitting FakeVim Mode

Using Git

Using Git for Windows

Working with the Current File

Viewing Git Diff

Viewing Git Log

Viewing Annotations

Staging Changes

Resetting Changes

Working with the Current Project

Cleaning Projects

Working with Local Repositories

Viewing Reference Log

Viewing Git Status

Committing Changes to Git

Amending Commits

Resetting Local Repository

Working with Branches

Configuring Merge Tools

Applying Patches

Using Stashes

Applying Actions to Commits

Initializing Git Repositories

Working with Remote Repositories

Managing Remote Repositories

Using Git with Subversion

Reviewing Code with Gerrit

Working with Git Tools

Using Language Servers

Adding MIME Types for Language Servers

Specifying Settings for Language Clients

Adding Language Servers

Specifying Generic Settings

Specifying Java Language Server Settings

Supported Locator Filters

Reporting Issues

Using Mercurial

Using Perforce

Configuring Perforce

Editing Files

Using QML Modules with Plugins

Registering QML Types

Generating qmltypes Files

Dumping Plugins Automatically

Importing QML Modules

Using Qt Quick Designer

Enabling the Qt Quick Designer Plugin

Using Qt Quick Toolbars

Previewing Images

Formatting Text

Previewing Animation

Editing Rectangles

Using Subversion

Using Text Editing Macros

Using Valgrind Code Analysis Tools

Using Version Control Systems

Setting Up Version Control Systems

Setting Up General Options

Creating VCS Repositories for New Projects

Using Common Functions

Adding Files

Viewing Diff Output

Viewing Versioning History and Change Details

Annotating Files

Committing Changes

Reverting Changes

Viewing Status

Updating the Working Tree

Deleting Files

Using the Help Mode

Viewing Function Tooltips

Finding Information in Qt Documentation

Adding Bookmarks to Help Pages

Full-text Search

Adding External Documentation

Detaching the Help Window

Selecting the Start Page

Using Documentation Filters

Validating with Target Hardware

Viewing Output

Finding and Filtering Output

Issues

Search Results

Application Output

Compile Output

Parsing Existing Compile Output

To-Do Entries

Visualizing Chrome Trace Events

Opening JSON Files

Visualizing Events

Selecting Event Ranges

Viewing Statistics

Collecting LTTng Data

Configuring the Kernel

Installing LTTng

Building Qt with Tracepoints

Recording Events

Enabling Trace Points

Scheduler Switch Trace Points

Syscall Trace Points

Converting LTTng Data to CTF

What is API Level?

Working in Edit Mode

Using the Editor Toolbar

Navigating Between Open Files and Symbols

Selecting Parse Context

Changing Text Encoding

Selecting Line Ending Style

Splitting the Editor View

Using Bookmarks

Adding Notes to Bookmarks

Navigating Bookmarks

Viewing Bookmarks

Moving to Symbol Definition or Declaration

Reparsing Externally Changed Files

Inspecting the Code Model

Working with Sidebars

Writing Code

Related Topics

avdmanager

qmake Build Configuration

Global qmake Settings

Compiling QML

qmake Build Steps

sdk_definitions.json

sdkmanager