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

Unnecessary warning message when using RotationAnimation.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0 RC
    • 5.0.0, 5.3.1
    • None
    • Windows XP, Windows7
    • e333c1ac2d0e68a1820073e8f68f467fc73863b3

    Description

      When RotationAnimation is used without specifying property or properties message 'QML RotationAnimation: Cannot animate non-existent property "angle"' is printed out to Application Output in QtCreator even though animation works just fine. This is because by default RotationAnimation tries to rotate all properties named "rotation" or "angle" and if only one of those exists, the warning message is printed out. RotationAnimation should be made to suppress warnings if at least one property for rotation is found in the target item.

      import QtQuick 2.0
      
      Rectangle {
          width: 400
          height: 200
      
          Rectangle {
              id: rect
              color: "red"
              width: 40
              height: 20
              anchors.centerIn: parent
      
              RotationAnimation {
                  target: rect
          //        property: "rotation"
                  from: 0
                  to: 360
                  running: true
                  duration: 1000
                  loops: Animation.Infinite
              }
          }
      }
      

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            miseppan1 Mikko Seppänen (Inactive)
            Votes:
            7 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes