Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.4.0 RC
-
Windows 8.1
Description
By following code I tried to reproduce actual problem with timers and animations.
With Qt 5.3.2 I mostly see 1001 in console, but with Qt 5.4 - 985.
In our application only in release mode the animations and timers run too fast.
import QtQuick 2.0 Item { id: root Timer { running: true triggeredOnStart: true repeat: true interval: 1000 property real lastDate: Date.now(); onTriggered: { const now = Date.now(); console.log("> " + (now - lastDate)) lastDate = now; } } Flipable { id: flipable width: root.width height: root.height property bool flipped: false property bool horizontalFlip: false transform: Rotation { id: flipRotation origin.x: flipable.width/2 origin.y: flipable.height/2 axis.x: flipable.horizontalFlip ? 0 : 1 axis.y: flipable.horizontalFlip ? 1 : 0 axis.z: 0 angle: 0 } states: State { when: flipable.flipped PropertyChanges { target: flipRotation angle: 180 } AnchorChanges { target: flipable anchors.horizontalCenter: root.horizontalCenter anchors.top: root.top } } transitions: Transition { ParallelAnimation { AnchorAnimation { duration: animTimer.interval } NumberAnimation { target: flipRotation property: "angle" duration: animTimer.interval } } } front: Rectangle { anchors.fill: parent color: "yellow" Text { anchors.centerIn: parent fontSizeMode: Text.Fit font.pointSize: 64 text: "Front" } } back: Rectangle { anchors.fill: parent color: "green" Text { anchors.centerIn: parent fontSizeMode: Text.Fit font.pointSize: 64 text: "Back" } } Timer { id: animTimer running: true repeat: true interval: 1000 onTriggered: { flipable.flipped = !flipable.flipped; } } } }