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

PathAnimation ignores the initial path element on subsequent loops

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.0
    • None

    Description

      If PathAnimation is run for multiple loops on a path containing multiple path elements, the first loop animates correctly, but subsequent loops ignore the first path element.

      With the example below, on the first loop, the box animates along the arc and the line, but on subsequent loops, the box only animates along the line.

      import QtQuick
      import QtQuick.Shapes
      
      Rectangle {
          width: 200
          height: 200
      
          Shape {
              ShapePath {
                  id: shapePath
      
                  strokeWidth: 1
                  strokeColor: "black"
                  fillColor: "transparent"
      
                  PathArc {
                      x: 50
                      y: 50
                      radiusX: x
                      radiusY: y
                      direction: PathArc.Clockwise
                  }
      
                  PathLine {
                      relativeX: 100
                      relativeY: 100
                  }
              }
      
              Rectangle {
                  id: box
                  width: 10
                  height: 10
                  color: 'orange'
              }
          }
      
          PathAnimation {
              loops: Animation.Infinite
              path: shapePath
              running: true
              target: box
              duration: 2000
              anchorPoint: Qt.point(box.width/2, box.height/2)
          }
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            blammit Bea Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes