[SOLVED]Execute different Transitions for the same State
-
wrote on 27 Mar 2015, 15:44 last edited by ealione
I have a button with some text. Everytime I click at that button I have its scale animated for a duration of X seconds
states: [ State { name: "pressed"; when: mouseArea.pressed PropertyChanges { target: canvas; scale: 1.2; text: "Hold"; currentValue: 0 } PropertyChanges { target: buttontext; scale: 2.2; color: Qt.darker(canvas.primaryColor, 1.25) } } ] transitions: [ Transition { NumberAnimation { properties: "scale"; duration: 600; easing.type: Easing.OutElastic } } ]
But I also want to change the colour of the text, this time with a smaller duration of Y.
How can this be done?
-
wrote on 27 Mar 2015, 16:09 last edited by
transitions: [ Transition { ParallelAnimation { NumberAnimation { properties: "scale"; duration: 600; easing.type: Easing.OutElastic } ColorAnimation { duration: 200; } } } ]
-
wrote on 30 Mar 2015, 06:41 last edited by
Hi Buttnik,
Thanks for the help, it does exactly what I was looking for.
1/3