Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70366

Implicit from value doesn't work in Animators

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 5.10.1
    • None
    • Linux/Wayland

       

      One great thing about Qt Quick is its lean&mean syntax. Implicitly derived sane values and consistency are one big factor behind the power of the language. In most cases nowadays it is recommended to transition existing transitions from main-thread bound Animations to smoother and more robust Animators. Unfortunately Animator implicit values don't work like expected and inconsistently compared to the older Animations. I have suspicion there are other inconsistencies as well, but at least Animator.to implicit value works differently to Animation.to.

      import QtQuick 2.6
      
      Rectangle {
          width: 100; height: 100
          Rectangle {
              color: "red"
              radius: width/2
              y: 30; x: 25; width: 30; height: 30
      
              // Works:
              /*SequentialAnimation on x {
                  loops: Animation.Infinite
                  NumberAnimation { to: 45 }
                  NumberAnimation { to: 25 }
              }*/
              // Doesn't work:
              SequentialAnimation on x {
                  loops: Animation.Infinite
                  XAnimator { to: 45 }
                  XAnimator { to: 25 }
              }
          }
      }
      

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jpetrell Joona Petrell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes