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

QML Timer with Animation still running too fast on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.10.1
    • Quick: SceneGraph
    • None
    • Qt 5.10.1 MinGW / MSVC

      Qt Creator 4.5.1

      Windows 10

    Description

      The timer bug https://bugreports.qt.io/browse/QTBUG-42699 was fixed in Qt 5.5.

      However on Qt 5.10.1, Timers still seem to run 1 or more frames / second too fast, if Animations are used.

      Example code:

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

      Prints:

      
      qml: 929
      qml: 960
      qml: 944
      qml: 944
      qml: 943
      

      Adding the QSG_RENDER_LOOP=basic fixes the problem. But this makes AnimatedSprite's performance wors (runs at 40FPS when used)

      Attachments

        Issue Links

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

          Activity

            People

              janichol Andy Nichols
              Chrisu Christian Bartsch
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes