How to measure time taken for QML item to appear on the screen since it was loaded?
-
Hi everyone,
In my QtQuick application I want measure time passed since the moment source or sourceComponent property of QML Loader has been changed to the moment visual item actually appeared on the screen (got painted).
How can I do this?Loader { id: _loader source: "MyVisualItem.qml" }
I already tried using statusChanged and Component.onCompleted signals but neither is accurate enough - it is easy to see that actual time is significantly greater.
Thanks in advance
-
Status change may give some near time. Componet.Oncompleted will fire when the object is created not when shown. So best bet qmlprofiler to check accurate time.
-
@dheerendra is there any way to do this from within my application?
-
I don't see a possibility.
-
If you need this for just measuring the performance of your application, maybe you should use the QML Profiler instead http://doc.qt.io/qtcreator/creator-qml-performance-monitor.html