Is it possible to change the animation duration after the animation starts?
Unsolved
QML and Qt Quick
-
Hi, I am using PathAnimation like the following:
PathAnimation { id: pathAnimation target: parent duration: 1000 running: true path: pathId }
After the animation starts, halfway during the animation, is it possible to change the duration? Thank you in advance
-
@QTLeearn -there may be plenty of ways to do this, I would start with trying Timer;
PathAnimation { id: pathAnimation target: null // changed to 'null' so I can run the code duration: 5000 running: true path: null // changed to 'null' so I can run the code } // for notifying initial duration rate Timer { interval: 500 running: true repeat: false onTriggered: { console.log("duration is 5 seconds") } } // for notifying changed duration rate Timer { interval: 2500 running: true repeat: true onTriggered: { pathAnimation.duration = 2500 console.log("duration is now 2.5 seconds") } } }