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. Infinite animations, where "from" and "to" are set based on chaning values
Qt 6.11 is out! See what's new in the release blog

Infinite animations, where "from" and "to" are set based on chaning values

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 576 Views 1 Watching
  • 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.
  • R Offline
    R Offline
    RudolfVonKrugstein
    wrote on last edited by
    #1

    Hey,

    I am atempting to animated the BusyIndicator of the material design like here: https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B6Okdz75tqQsemFpeElQMFBSMG8/061101_Circular_Sheet_xhdpi_004.webm

    For this I need want to animate the "start" end "end" Angles of a circle arc. The animation should be like this (in a sequential animation):

    1. Animate the start angle from its current value to endAngle+2*M.PI - offset
    2. Animate the end angle form its current value to startAngle
    3. Loop

    So I am doing this (arc is the object drawing the circle arc on a canvas):

     SequentialAnimation {
                running: control.visible == true
                loops: Animation.Infinite
                RotationAnimation {
                    target: arc
                    property: "startAngle_"
                    from: arc.startAngle_
                    to: arc.endAngle_ + 2*Math.PI * 7.0/8.0
                    duration: 5000
                    easing.type: Easing.InOutQuad
                }
                RotationAnimation {
                    target: arc
                    property: "endAngle_"
                    from: arc.endAngle_
                    to: arc.startAngle_
                    duration: 5000
                    easing.type: Easing.InOutQuad
                }
            }
    }
    

    Now it seems that the "to" and "from" values are taking from the moment the outer SequentialAnimation starts, not the moment the individual animation starts.

    How can I change this?
    Or, can I define an animation that animates to a value relative the current value at the moment the animation starts?

    Thanks!
    Nathan

    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