Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42699

QML Timer too fast with Animation on Windows

XMLWordPrintable

    • d3b0bd40ec2a2741e35e19250205af2d632a0a52

      import QtQuick 2.3
      
      Item {
          Timer {
              property var lastTime
              interval: 1000
              running: true
              repeat: true
              onTriggered: {
                  if (lastTime) {
                      console.log(Date.now() - lastTime);
                  }
                  lastTime = Date.now();
              }
          }
          SequentialAnimation on z {
              loops: Animation.Infinite
              NumberAnimation { from: 0; to: 1; duration: 1000 }
          }
      }
      

      Output:

      qml: 340
      qml: 333
      qml: 333
      qml: 334
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            lagocs Laszlo Agocs
            sqq S.Gold
            Votes:
            9 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes