From 7bedd55551fbe95355b0db11f9d576924e829f9d Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 20 Sep 2017 15:15:06 -0500 Subject: 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 --- examples/quick/shapes/content/item11.qml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'examples/quick') 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 } + } } } } -- cgit v1.2.3