Displaying Frame-Rate of System-UI and Applications Example

How to use FrameTimer to display frame-rate information.

The "FrameTimer" example with two applications running.

This example shows you how to use the FrameTimer component to display frame-rate information of both System-UI and application windows.

The System-UI is comprised of a column of application icons on the left side and a graph on the top right side, displaying the average frame-rate of the System-UI itself (actually of System-UI's top-level Window, to be more precise). If there are no applications running, System-UI's frame rate will mostly stay at 1 frame per second. That's because a Qt QML application window is only redrawn when needed. If nothing changed on it, it won't redraw (zero frames per second then). The only reason that System-UI stays around 1 FPS when there are no apps running is because of the FPS graph itself, which is updated once every second and thus causes a redraw of the System-UI (an Observer effect).

The Fish application animates (and therefore redraws) at a rate of 25 frames per second. So running it will instantly raise the frame-rate of System-UI to 25 FPS (frames per second) as well.

The Rabbit application animates at native speed (ie, as fast as the system can or is configured to do, which is usually 60 FPS). So running it will raise System-UI's FPS further, to 60 FPS.

Files:

© 2019 Luxoft Sweden AB. 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.