Display Frame Rate for the System UI and Applications Example
How to use the FrameTimer to display information about the frame rate.
Note: Please read this if you want to build the example on a Linux machine.
Introduction
This example shows you how to use the FrameTimer component to display frame rate information for both the System UI and the application windows.
The System UI comprises of a column of application icons on the left and a graph on the top right, displaying the average frame rate for the System UI itself. To be more precise, this is the System UI's top-level Window. If there are no applications running, the System UI's frame rate typically stays at 1 Frame per Second (FPS). This is because a Qt QML application window is only redrawn when something changed. In this idle state the System UI's frame rate would normally be 0 FPS. The only reason the System UI stays at around 1 FPS in idle in this example is because of the FPS graph itself updating once per second. This is commonly referred to as the Observer effect.
Starting with 6.9 this example will in addition use the FrameContentTracker component which can help you to find out if the system is redrawing too often, although nothing is changing on screen. This information is displayed in the top right corner as a Duplicate frames counter. A nice way to see this in action is to run either of the applications and then move their window off-screen to the left, until only the static, non-animated part of their window is visible anymore. Please read the part about performance implications in the FrameContentTracker documentation!
The Fish application animates, and therefore redraws, at a rate of 25 FPS. So running it will instantly raise the frame-rate of System UI to 25 FPS as well.
Timer { running: true repeat: true interval: 1000 / 25 // 25 frames per second onTriggered: { rectangle.rotation = (rectangle.rotation + 5) % 360; } } } MouseArea { id: mouseArea anchors.fill: parent } }
The Rabbit application animates at native speed, which is as fast as the system can or is configured to do, which is usually 60 FPS. Consequently, running this application raises the System UI's FPS further, to 60 FPS.
RotationAnimation on rotation { from: 0; to: 360; loops: Animation.Infinite; duration: 4000 } } MouseArea { id: mouseArea anchors.fill: parent } }
© 2025 The Qt Company Ltd. 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.