Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    How to perform state change that changes animation gracefully?

    QML and Qt Quick
    1
    1
    458
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      oneWonders last edited by

      I have on object that I want to have different states, being:
      @1: off, invisible, no animation - would prefer to set invisible for performance reasons but might have to set opacity 0 instead. -> when x = false
      2: animation 1, (opacity animation - infinite loop) ----> when x = true && y > 0.5
      3: animation 2, (opacity animation - infinite loop) ----> when x = true && 0.1 <y <= 0.5
      4: fullbright, opacity = 1 ----> when x = true && y <= 0.1@

      The problem i have is that i do not know how to get the state to only perform its property changes when the animation has finished playing.
      I set the "always play to end" property of the animations to true so that they always will end "gracefully".
      The problem is, i only want the state to start the other changes when the animation has fully stopped (which can be found via the "onStopped" event).

      It's almost like i want the state change or transition to stop halfway through and wait for that event or something but i don't know how to do that - i suppose you could poll but that is really really bad!

      If i haven't made any sense then i can try and explain a bit better...

      Thanks!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post