On this page

Profile QML applications

With QML Profiling, you can find causes for typical performance problems in your applications, such as slowness and unresponsive, stuttering user interfaces.

To collect data about a QML application:

  1. Go to Profile to open the Profile mode. The start page lists the profiling options.
  2. In Backend, select QML Profiling.
  3. In the target selector, select Startup Project to profile the current project, or Custom Executable to profile another application.
  4. Select Start Recording to start the application and collect data. To start the application without collecting data, select Start Paused.

While the application runs, the recording page shows the time that the recording has been running. Select Pause to pause the data collection without ending it, and Resume to continue.

Select Stop Recording to stop and open the collected data in a trace editor. Data collection takes time, so expect a delay before seeing data.

Do not use application commands to exit the application because data is sent to Qt Creator when you select Stop Recording. The application stops in seconds. If you exit the application, the data is not sent.

Trace editor tabs and toolbar

Save and load data

To view data that you saved earlier, select Load Trace File on the start page, or open the file as you would open any other file. Qt Creator loads .qtd and .qzt files and shows them in the trace editor.

You can also deliver trace files to others for examination or load files that you receive from them.

Flush data while profiling

Set data flushing preferences either globally for all projects or separately for each project.

To set global preferences, go to Preferences > Analyzer > QML Profiling.

QML Profiling preferences

To specify custom QML Profiling settings for a particular project:

  1. Go to Projects > Run Settings.
  2. In QML Profiling Settings, select Custom.

You can set the following preferences:

SettingValue
Flush data while profilingFlush the data periodically instead of flushing all data when profiling stops. This saves memory on the target device and shortens the wait between the profiling being stopped and the data being displayed.
Flush intervalSet the flush interval in milliseconds. The shorter the interval, the more often the data is flushed. The longer the interval, the more data has to be buffered in the target application, potentially wasting memory. However, the flushing itself takes time, which can distort the profiling results.
Process data only when process endsAggregate data from many QML engines into one trace. Otherwise, the profiling stops when one of the engines stops.

The Target frame rate and the Report settings set the thresholds for the performance rating on the Dashboard tab and for the entries on the Findings tab.

To restore the global settings for the project, select Restore Global.

Attach to a running Qt Quick application

To attach to a waiting application:

  1. Go to Analyze > QML Profiling (Attach to Waiting Application).

    Start QML Profiling dialog

  2. In Kit, select the kit used to build the application.
  3. In Port, specify the port to listen to.
  4. Select OK.

Copyright © The Qt Company Ltd. and other contributors. 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.