Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
None
-
None
Description
Background
All Transitions on x,y are linear in QML (i.e. a straight line). It would be useful to be able to animate over a Path
Use-case
- Create an animation between two points, but where the animated object follows a path rather than a straight line
Example Code
Animation over a Path
Rectangle {
id: rect
width: 200; height: 200;
Rectangle {
color: "red"
width: 50; height: 50
PathAnimation on x,y {
path: Path {
startX: 120; startY: 100
PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 }
PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 }
}
}
}
}
Attachments
Issue Links
- resulted from
-
QTBUG-9687 Spline element for QML using Path's
- Closed