On this page

FrameTimer QML Type

Provides frame rate information about a given window. More...

Import Statement: import QtApplicationManager

Properties

Methods

Detailed Description

FrameTimer is used to get frame rate information for a given window. For measuring the frame rate of a System UI window, window must be a toplevel Window. The frame rate of application windows can be measured from the System UI, by setting window to a WindowObject or in the application itself, by setting window to an ApplicationManagerWindow (or toplevel Window). An application window's frame rate is only meaningful and consequently can only be measured in multi-process mode.

The following snippet shows how to use FrameTimer to display the frame rate of a Window:

import QtQuick
import QtApplicationManager

Window {
    id: toplevelWindow
    ...
    FrameTimer {
        id: frameTimer
        running: topLevelWindow.visible
        window: toplevelWindow
    }
    Text {
        text: "FPS: " + Number(frameTimer.averageFps).toLocaleString(Qt.locale("en_US"), 'f', 1)
    }
}

You can also use this component as a MonitorModel data source if you want to plot its previous values over time:

import QtQuick
import QtApplicationManager

Window {
    id: toplevelWindow
    ...
    MonitorModel {
        running: true
        FrameTimer {
            window: toplevelWindow
        }
    }
}

Please note that when using FrameTimer as a MonitorModel data source there's no need to set it to running as MonitorModel will already call update() as needed.

Property Documentation

averageFps : real [read-only]

The average frame rate of the given window, in frames per second, since update() was last called (either manually or automatically in case running is set to true).

See also window, running, and update().

interval : int

The interval, in milliseconds, between update() calls while running is true. (default: 1000)

See also update() and running.

jitterFps : real [read-only]

The frame rate jitter of the given window, in frames per second, since update() was last called (either manually or automatically in case running is set to true). It is calculated from the average deviation between the actual frame time and an ideal frame time of 16.667 ms (equivalent to 60 fps).

See also window, running, and update().

maximumFps : real [read-only]

The maximum frame rate of the given window, in frames per second, since update() was last called (either manually or automatically in case running is set to true). It is calculated from the minimum time between two consecutive frames.

See also window, running, and update().

minimumFps : real [read-only]

The minimum frame rate of the given window, in frames per second, since update() was last called (either manually or automatically in case running is set to true). It is calculated from the maximum time between two consecutive frames.

See also window, running, and update().

roleNames : list<string> [read-only]

Names of the roles provided by FrameTimer when used as a MonitorModel data source.

See also MonitorModel.

running : bool

If true, update() will get called automatically every interval milliseconds.

When using FrameTimer as a MonitorModel data source, this property should be kept as false.

See also update() and interval.

window : Object

The window to be monitored, from which frame rate information will be gathered. It can be either a toplevel Window (from the QtQuick.Window module), an ApplicationManagerWindow (from the QtApplicationManager.Application module) or a WindowObject (from the QtApplicationManager.SystemUI module).

See also WindowObject.

Method Documentation

update()

Updates the properties averageFps, minimumFps, maximumFps and jitterFps. Then resets the internal counters for the new time period starting from the moment this method is called.

Note that you normally don't have to call this method directly, as FrameTimer does it automatically every interval milliseconds while running is set to true.

See also running.

© 2026 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.