Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to measure time taken for QML item to appear on the screen since it was loaded?
QtWS25 Last Chance

How to measure time taken for QML item to appear on the screen since it was loaded?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qmlloaderqtquick2timeitem
5 Posts 3 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    diredko
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      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
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      D 1 Reply Last reply
      1
      • dheerendraD dheerendra

        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.

        D Offline
        D Offline
        diredko
        wrote on last edited by
        #3

        @dheerendra is there any way to do this from within my application?

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          I don't see a possibility.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          0
          • S Offline
            S Offline
            shaan7
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved