Qt Creator Manual

Acknowledgements

Credits

Third-party Components

Adding Bindings Between Properties

Adding Compilers

Redetecting Compilers

Specifying Compiler Settings

Adding Nim Compilers

Adding Custom Compilers

Troubleshooting MinGW Compilation Errors

Adding Connections

Adding Debuggers

Adding JSON-Based Wizards

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 Kits

Filtering Kit Settings

Specifying Kit Settings

Using Ninja as a CMake Generator

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

Verbose Output

Adding Qt Designer Plugins

Locating Qt Designer Plugins

Configuring Qt Designer Plugins on macOS

Matching Build Keys

Adding Qt Versions

Setting Up New Qt Versions

Troubleshooting Qt Installations

Minimum Requirements

Adding States

Using States

Using SCXML State Machines

Animating Transitions Between States

Adding XML-Based Wizards

Creating XML-Based Project Wizards

Creating Class Wizards

Supported Widgets

Path Choosers

Check Boxes

Text Editors

Processing Template Files

Pre-defined Standard Variables

Validating User Input

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

Beautifying Source Code

Browsing ISO 7000 Icons

Using ISO Icons in Applications

Browsing Project Contents

Viewing Project Files

Viewing the File System

Viewing Open Documents

Viewing Defined Types and Symbols

Viewing the Class Hierarchy

Viewing Type Hierarchy

Viewing Include Hierarchy

Building Applications for the Web

Requirements

Setting Up the Development Environment

Building and Running

Related Topics

Building and Running an Example

Building for Multiple Platforms

Additional Build Commands

Building with CMake

Building with qmake

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

Commercial Features

Comparing Files

Viewing the Changes

Changing the Colors

Completing Code

Summary of Available Types

Completing Code Snippets

Editing Code Snippets

Adding and Editing Snippets

Removing Snippets

Resetting Snippets

Completing Nim Code

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

Enabling and Disabling Plugins

Configuring the Editor

Related Topics

Connecting Android Devices

Requirements

Setting Up the Development Environment

Specifying Android Device Settings

Managing Android SDK Packages

Selecting Android Devices

Using the Android Emulator

Debugging on Android Devices

Connecting Bare Metal Devices

Connecting Devices

Related Topics

Connecting Embedded Linux Devices

Configuring SSH Connections

Generating SSH Keys

Managing Device Processes

Connecting MCUs

Requirements

Setting Up the Development Environment

Enabling Bare Metal and MCU Plugins

Specifying MCU Settings

Adding MCU Devices

Adding MCU Kits

Running Applications on MCUs

Connecting Objects to Signals

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 Projects

Adding Qt Quick Timeline Module to Qt Installations

Creating Animations

Enabling the Timeline Editor

Creating Timelines

Binding Animations to States

Managing Keyframes

Navigating the Timeline

Setting Keyframe Values

Viewing the Animation

Editing Easing Curves

Attaching Easing Curves to Keyframes

Customizing Easing Curves

Editing Animation Curves

Rotating Items

Creating Buttons

Creating Components

Adding Components to Designs

Using Basic QML Types

Using Data Models

Positioning Items in UIs

Setting Bindings

Setting Anchors and Margins

Using Positioners

Using Layouts

Editing Stack Layouts

Organizing Items

Adding User Interaction Methods

History of Qt Quick Controls

Creating Components in Design Mode

Moving Within Components

Creating Projects

Selecting the Build System

Using Project Wizards

Selecting Project Type

Creating 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 Pane

Adding Subprojects to Projects

Binding Keyboard Shortcuts to Wizards

Related Topics

Creating Qt Quick Projects

Creating Empty Qt Quick Applications

Creating Qt Quick Controls Applications

Creating Qt Quick UI Projects

Creating Scalable Buttons and Borders

Creating a Mobile Application

Setting up the Development Environment

Creating the Project

Creating the Accelbubble Main View

Moving the Bubble

Locking Device Orientation

Adding Dependencies

Adding Resources

Running the Application

Creating a Qt Quick Application

Creating the Project

Creating the Main View

Adding Application Logic

Adding Animation to the View

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

Using Ministro to Install Qt Libraries

Packaging Applications

Specifying Settings for Packages

Building AABs

Selecting API Level

Signing Android Packages

Adding External Libraries

Editing Manifest Files

Installing Ministro

Deploying Applications to Embedded Linux Devices

Generic Deployment Steps

Qt for Device Creation Deployment Steps

Developing with Qt 5.8 or Earlier

Developing with Qt 5.9 or Later

Deploying CMake Projects to Embedded Linux Devices

Deploying Applications to QNX Neutrino Devices

Deploying to Devices

Designing User Interfaces

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

Related Topics

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 PathView Properties

Editing QML Files in Design Mode

Snapping to Parent and Sibling Items

Hiding Item Boundaries

Selecting Items

Previewing Component Size

Specifying Canvas Size

Refreshing the Canvas

Editing State Charts

Creating State Charts

Managing States

Managing Transitions

Adding Executable Content

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

Finding

Finding and Replacing

Advanced Search

Enabling Silver Searcher

Exploring Clang AST

Getting Help

Related Topics

Getting Started

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

Indenting Text or Code

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

Naming Getters

Interacting with the Debugger

Using the Debugger

Setting Breakpoints

Adding Breakpoints

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

Keyboard Shortcuts

Configuring Keyboard Shortcuts

Default Keyboard Shortcuts

General Keyboard Shortcuts

Editing Keyboard Shortcuts

Emacs Shortcuts

Image Viewer Shortcuts

Design Mode Keyboard Shortcuts

Debugging Keyboard Shortcuts

Project Keyboard Shortcuts

Help Keyboard Shortcuts

Version Control Keyboard Shortcuts

Known Issues

General Issues

Editing Issues

Projects Issues

Debugging Issues

Design Mode 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 C++ Backend Objects

Managing Item Hierarchy

Setting the Stacking Order

Switching Parent Items

Managing Projects

Related Topics

Managing Sessions

Modeling

Using the Model Editor

Creating Models

Creating Package Diagrams

Creating Class Diagrams

Adding Relations

Specifying Members

Creating Component Diagrams

Adding Custom Elements

Opening Projects

Optimizing Applications for Mobile Devices

Parsing C++ Files with the Clang Code Model

About the Clang Code Model

Configuring Clang Code Model

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

Previewing in Browsers

Previewing on Desktop

Previewing on Devices

Previewing on Embedded Devices

Profiling Function Execution

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

Qt Creator Manual

Qt Quick UI Forms

Supported Methods

JavaScript Functions

Qt QML Methods

Using Qt Quick UI Forms

Refactoring

Finding Symbols

Finding QML Types

Viewing Search Results

Renaming Symbols

Column Editing

Applying Refactoring Actions

Refactoring C++ Code

Refactoring QML Code

Running Autotests

Creating Tests

Creating Qt and Qt Quick Tests

Creating Google Tests

Creating Boost Tests

Setting Up the Google C++ Testing Framework

Building and Running Tests

Selecting Tests to Run

Running and Debugging Tests from Code Editor

Specifying Settings for Running Qt Tests

Specifying Settings for Running Google Tests

Specifying Settings for Running Boost Tests

Viewing Test Output

Running Valgrind Tools on External Applications

Running on Multiple Platforms

Running on Embedded 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 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

Mapping Source Paths

Setting CDB Paths on Windows

Setting up FSF GDB for macOS

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

Editing Build Configurations

qmake Build Configuration

CMake Build Configuration

Starting External Processes

Using Environment Variables

Using Qt Creator Variables

Build Steps

qmake Build Steps

Compiling QML

CMake Build Steps

Qbs Build Steps

Adding Custom Build Steps

Executing Custom Commands

Clean Steps

CMake Clean Steps

Qbs Clean Steps

Build Environment

Batch Editing

Clearing the System Environment

Specifying Code Style Settings

Specifying Dependencies

Specifying Dynamic Properties

Specifying Editor Settings

Specifying Item Properties

Viewing Changes in Properties

Picking Colors

Picking Gradients

Marking Text Items for Translation

Loading Placeholder Data

Using Dummy Models

Creating Dummy Context

Building Transformations on Items

Editing Properties Inline

Specifying Run Settings

Creating Run Configurations for Subprojects

Specifying Run Settings for Desktop Device Types

Specifying Valgrind Settings

Specifying Debugger Settings

Specifying Run Settings for Android Devices

Specifying Run Settings for Linux-Based Devices

Specifying Run Settings for QNX Devices

Specifying Run Settings for Embedded 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

File Encoding

Supported Platforms

Development Platforms

Developing for Embedded Devices

Compiling from Source

Target Platforms

Embedded Devices

Mobile Devices

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

User Interface

Navigating with Keyboard

Useful Features

Changing Languages

Viewing Images

Exporting SVG Images

Platform Notes

Location of Functions

Location of Settings Files

High DPI Scaling

Using Bazaar

Uncommitting Revisions

Using CVS

Using Clang Tools

Running Clang Tools

Configuring Clang Tools

Selecting Clazy Check Levels

Using ClearCase

Using GNU Diffutils with ClearCase

Checking out and Checking in

Using Command Line Options

Using Custom Styles

Using Debugging Helpers

Extending 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

Previewing QML Files

Using External Text Editors

Configuring External Tools

Using FakeVim Mode

Supported Modes and Commands

Normal and Visual Modes

Command Line Mode

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

Supported Locator Filters

Reporting Issues

Using Mercurial

Using Other Build Systems

Using Perforce

Configuring Perforce

Editing Files

Using QML Modules with Plugins

Registering QML Types

Generating qmltypes Files

Dumping Plugins Automatically

Importing QML Modules

Running QML Modules in Design Mode

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

Viewing 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

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

Moving to Symbol Definition or Declaration

Reparsing Externally Changed Files

Inspecting the Code Model

Writing Code

Related Topics

macOS