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. OpacityAnimator vs NumberAnimation in a Transition yields different results
Forum Updated to NodeBB v4.3 + New Features

OpacityAnimator vs NumberAnimation in a Transition yields different results

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 422 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.
  • vikramgV Offline
    vikramgV Offline
    vikramg
    wrote on last edited by
    #1

    Using an OpacityAnimator in a Transition animates opacity changes only from 0 to 1 and not the other way around. Using a NumberAnimation instead, animates all changes correctly. Why is this?

            Transition {
                to: ""
                SequentialAnimation {
                    //OpacityAnimator {}
                    NumberAnimation { properties: "opacity" }
    

    As great as QML is, I seem to trip up on quirks all the time. Would be nice to be able to reason these things out rather than having to keep adding to a growing list of caveats and gotchas.

    1 Reply Last reply
    0
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on last edited by
      #2

      Because Animators are different thigs and do not work like Animations are. You can read detailed description here.

      1 Reply Last reply
      0
      • vikramgV Offline
        vikramgV Offline
        vikramg
        wrote on last edited by
        #3

        Yes I did see that link, but all it says is that Animators are run on the render thread. Other than that,
        "The Animator types can be used just like any other Animation type."
        It even explicitly says you can use Animators in a SequentialAnimation, and then that will get run on the render thread as well if possible.

        So it doesn't really explain the observed behavior.

        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