aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorMichael Brasser <mbrasser@ford.com>2017-09-20 15:15:06 -0500
committerMichael Brasser <michael.brasser@live.com>2017-11-07 16:29:16 +0000
commit7bedd55551fbe95355b0db11f9d576924e829f9d (patch)
treefdef6c4ec81b46161162abacefe350c87a373830 /examples/quick
parenta10f154e3b46cc004ab6f7d5319f550c450987d4 (diff)
Add new PathAngleArc type
This type allows working with arcs in different ways (based on angles rather than start/end positions) that can be more intuitive for certain use cases (such as a circular progress indicator). [ChangeLog][QtQuick][Path] Add new PathAngleArc type Change-Id: Icbe5fc0450edd9a4d92f9a8d03438842b72a312d Task-number: QTBUG-62684 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/shapes/content/item11.qml14
1 files changed, 9 insertions, 5 deletions
diff --git a/examples/quick/shapes/content/item11.qml b/examples/quick/shapes/content/item11.qml
index 0cfe73d5c9..bdd08339e3 100644
--- a/examples/quick/shapes/content/item11.qml
+++ b/examples/quick/shapes/content/item11.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.11
import QtQuick.Shapes 1.0
Rectangle {
@@ -100,11 +100,15 @@ Rectangle {
strokeWidth: 20
capStyle: ShapePath.RoundCap
- startX: 20; startY: 50
- PathArc {
- x: 20; y: 90
+ PathAngleArc {
+ centerX: 65; centerY: 95
radiusX: 45; radiusY: 45
- useLargeArc: true
+ startAngle: -180
+ SequentialAnimation on sweepAngle {
+ loops: Animation.Infinite
+ NumberAnimation { to: 360; duration: 2000 }
+ NumberAnimation { to: 0; duration: 2000 }
+ }
}
}
}