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. SequenceAnimationm in Behaviour for different values?
Forum Updated to NodeBB v4.3 + New Features

SequenceAnimationm in Behaviour for different values?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 111 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.
  • S Offline
    S Offline
    shokarta
    wrote on last edited by
    #1

    hello guys,

    so I have:

    Rectangle {
    id: rect
    color: "white"
    Behavior on color {
        SequentialAnimation {
            loops: 1
            ColorAnimation { from: "white"; to: "green"; duration: 500 }
            ColorAnimation { from: "green"; to: "white"; duration: 500 }
        }
    }
    }
    

    and when i wanted to trigger the blink from white to green and then back to white, i used call from JS like this:

    rect.color = "green"
    rect.color = "white"
    

    however now I need to decide which color to blink (if current white -> green -> white) or another (white -> red -> white).

    Honesly I have no idea how to do this, I cant put two sequentionalAnimations inside one behaviour, so please guys help me here how do I chose which color to blink

    1 Reply Last reply
    0
    • S Offline
      S Offline
      shokarta
      wrote on last edited by
      #2

      simple,
      just remove "to" from ColorAnimation

      1 Reply Last reply
      0
      • S shokarta has marked this topic as solved on

      • Login

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