Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to perform state change that changes animation gracefully?

How to perform state change that changes animation gracefully?

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 560 Views
  • 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 Offline
    O Offline
    oneWonders
    wrote on last edited by
    #1

    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
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved