Profiling and optimizing QML
The QML engine in Qt 6 took advantage of hardware acceleration to make its rendering capability and performance superior to the old widgets user interface. However, this does not mean that you do not need to worry about optimization, because small performance issues may snowball into bigger problems over time and cause damage to your product’s reputation.
How to do it…
Follow these steps to start profiling and optimizing a QML application:
- Let’s create a Qt Quick Application project:
Figure 14.4 – Create a Qt Quick Application project
- Then, go to Analyze | QML Profiler and run the QML Profiler tool:
Figure 14.5 – Run the QML Profiler to check the QML performance
- Your Qt Quick project will then be run by the QML Profiler. The QML Profiler window will also appear under the code editor. Click the Stop button located at the top bar...