C

QulPerfOverlay QML Type

Adds screen overlay with performance metrics. More...

Import Statement: import QtQuickUltralite.Profiling
Since: Qt Quick Ultralite 2.6
Inherits:

Item

Detailed Description

This QML type adds a performance metrics overlay on top of the application's user interface.

Example usage

Add the QulPerfOverlay QML object for benchmark results in root qml. This overlay becomes visible when benchmarkTimer is triggered after 30 seconds.

QulPerfOverlay {
    id: benchmarkResult
    anchors.horizontalCenter: parent.horizontalCenter;
    anchors.verticalCenter: parent.verticalCenter;
    visible: false
}

After the benchmark mode runs for predefined time, stop the recording of performance parameters and make the screen overlay visible.

Timer {
    id: benchmarkTimer
    interval: 30000
    running: true
    repeat: false
    onTriggered: {
        QulPerf.recording = false;
        benchmarkResult.visible = true
    }
}

Note: The QulPerf.recording property has to be set to true to start collecting performance metrics. This could be done for example either with the Component.onCompleted signal, to collect measurements since the start of the application, or via a Timer or dedicated signals to profile specific parts. See Benchmark mode for more information.

Available under certain Qt licenses.
Find out more.