[Qt-qml] Pause animation until a condition is met

Alex alexlordax+qt at gmail.com
Fri Aug 27 19:40:16 CEST 2010


On Thu, Aug 26, 2010 at 9:11 PM,  <michael.brasser at nokia.com> wrote:
> On 27/08/2010, at 8:21 AM, ext Alex wrote:
>>
>> SequentialAnimation {
>>  NumberAnimation {}
>>  ConditionalPauseAnimation { condition: myComponent.isReady }
>>  NumberAnimation {}
>> }
>
> I can't think of anything currently available that's as elegant as the above -- could you add a suggestion for this in JIRA?

I just added QTBUG-13240.

>
> You could try something like this to pause the animation:
>
> SequentialAnimation {
>    id: group
>    NumberAnimation { to: 200 }
>    ScriptAction { script: if (!myComponent.isReady) group.pause() }
>    NumberAnimation { to: 400 }
> }
>
> and then elsewhere call group.resume() whenever the condition is met.

Thanks for the suggestion.  It is a little clunky but should work...

Cheers,
Alex




More information about the Qt-qml mailing list