Qt Creator Manual

Acknowledgements

Third-party Components

Adding Compilers

Adding Nim Compilers

Adding Custom Compilers

Troubleshooting MinGW Compilation Errors

Adding Connections

Connecting Objects to Signals

Specifying Dynamic Properties

Adding Bindings Between Properties

Managing C++ Backend Objects

Adding Debuggers

Adding JSON-Based Wizards

Integrating Wizards into Qt Creator 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

Combo Box

Label

Line Edit

Path Chooser

Spacer

Text Edit

Available Generators

File Generator

Scanner Generator

Adding Kits

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

Analyzing CPU Usage

Using the CPU Usage Analyzer

Specifying CPU Usage 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

Beautifying Source Code

Browsing ISO 7000 Icons

Using ISO Icons in Applications

Building and Running

Related Topics

Building and Running an Example

Building for Multiple Platforms

Checking Code Syntax

Checking JSON Data Structure

Checking JavaScript and QML Syntax

List of JavaScript and QML Checks

Resetting the Code Model

Inspecting QML and JavaScript

Automatically Formatting QML/JS Files

Coding

Related Topics

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

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

Generating SSH Keys

Managing Device Processes

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

Creating Buttons

Creating Components

Using Qt Quick Controls

Creating Components in Qt Quick Designer

Moving Within Components

Creating Projects

Selecting the Build System

Using Project Wizards

Selecting Project Type

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 2 Applications

Creating Qt Quick UI Projects

Creating Scalable Buttons and Borders

Creating Screens

Adding Components to Screens

Using Data Models

Positioning Items on Screens

Setting Bindings

Setting Anchors and Margins

Using Positioners

Using Layouts

Editing Stack Layouts

Organizing Items

Using States

Using SCXML State Machines

Animating Screens

Adding User Interaction Methods

Implementing Application Logic

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

Executing JavaScript Expressions

Applying QML Changes at Runtime

Inspecting Items

Inspecting User Interfaces

Debugging a C++ Example Application

Debugging a Qt Quick Example Application

Deploying Applications to Android Devices

Creating Distributable APK Packages

Using Ministro to Install Qt Libraries

Packaging Applications

Specifying Settings for Packages

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

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

Editing State Charts

Creating State Charts

Managing States

Managing Transitions

Adding Executable Content

Exporting Designs from Graphics Software

Exporting from Adobe Photoshop to QML

Exporting from GIMP to QML

Conversion Rules

Preparing Files for Conversion

Running the Export Script

FAQ

General Questions

Qt Designer Integration 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

IDE Overview

Indenting Text or Code

Indenting C++ Files

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

Locals and Expressions

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

Creating Snapshots

Keyboard Shortcuts

Configuring Keyboard Shortcuts

Default Keyboard Shortcuts

General Keyboard Shortcuts

Editing Keyboard Shortcuts

Emacs Shortcuts

Image Viewer Shortcuts

Qt Quick Designer 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

Qt Quick Designer Issues

Launching the Debugger

Launching the Debugger in Different Modes

Launching in Start Internal Mode

Launching in Start External Mode

Launching in Attach Mode

Launching in Core Mode

Launching in Post-Mortem Mode

Remote Debugging

Using GDB

Using CDB

Managing Projects

Related Topics

Managing Sessions

Modeling

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

Activating Clang Code Model

Configuring Clang Code Model

Pasting and Fetching Code Snippets

Specifying Settings for Code Pasting

Using Code Pasting Services

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 Commercial Features

Qt Creator Manual

Qt Creator TOC

Qt Quick UI Forms

Using Qt Quick UI Forms

Refactoring

Finding Symbols

Renaming Symbols

Column Editing

Applying Refactoring Actions

Refactoring C++ Code

Refactoring QML Code

Running Autotests

Creating Tests

Creating Qt Tests

Creating Google Tests

Setting Up the Google C++ Testing Framework

Building and Running Tests

Selecting Tests to Run

Specifying Settings for Running Qt Tests

Specifying Settings for Running Google 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

Searching with the Locator

Using Locator Filters

Configuring Locator Filters

Adding Web Search Engines

Creating Locator Filters

Configuring Locator Cache

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

Mapping Source Paths

Setting CDB Paths on Windows

Setting up FSF GDB for macOS

Setting Up Experimental LLDB Support

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

Specifying Defines

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

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 Editor Settings

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

Tips and Tricks

Switching Between Modes

Moving Between Open Files

Moving To the Edit Mode

Using the Filter in Options Dialog

Opening Output Panes

Using Keyboard Shortcuts

Running Qt Creator From Command Line

Showing and Hiding Sidebars

Moving To Symbols

Displaying Signals and Slots

Displaying Low Level Data

Showing Tooltips in Debug Mode

Locating Files

Adding a License Header Template for C++ Code

Pasting from Clipboard History

Sorting Lines Alphabetically

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

Modes

Browsing Project Contents

Viewing Project Files

Viewing the File System

Viewing the Class Hierarchy

Viewing QML Types

Viewing Type Hierarchy

Viewing Include Hierarchy

Viewing Output

Issues

Search Results

Application Output

Compile Output

Debugger Console

To-Do Entries

Changing Languages

Viewing Images

Exporting SVG Images

Navigating with Keyboard

Useful Features

Platform Notes

Using Bazaar

Uncommitting Revisions

Using CVS

Using Clang Static Analyzer

Supported Project Types and Tool Chains

Setting Up Clang Static Analyzer

Running Clang Static Analyzer

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

Reverting Changes Using Git

Working with the Current File

Working with the Current Project

Working with Local Repositories

Working with Branches

Applying Patches

Using Stashes

Applying Actions to Commits

Working with Remote Repositories

Managing Remote Repositories

Using Git with Subversion

Reviewing Code with Gerrit

Working with Git Tools

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 Qt Quick Designer

Using Qt Quick Designer

Managing Item Hierarchy

Setting the Stacking Order

Switching Parent Items

QML Type Library

Specifying Item Properties

Viewing Changes in Properties

Marking Text Items for Translation

Loading Placeholder Data

Using Dummy Models

Creating Dummy Context

Building Transformations on Items

Editing Properties Inline

Adding States

Working with QML Types on Canvas

Snapping to Parent and Sibling Items

Hiding Item Boundaries

Selecting Items

Previewing Component Size

Specifying Canvas Size

Refreshing the Canvas

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

Working in Edit Mode

Using the Editor Toolbar

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