Skip to content
QtWS25 Last Chance
  • Qtquick\Qml Arc

    Unsolved QML and Qt Quick arc shape canvas beginner help 3 Feb 2022, 16:59
    0 Votes
    4 Posts
    2k Views
    Hi @fallouthase, Please find bellow a simple example using PathAngleArc: https://doc.qt.io/qt-6/qml-qtquick-pathanglearc.html import QtQuick.Shapes Shape { width: 200 height: 200 anchors.top: parent.top anchors.left: parent.left // Enable multisampled rendering layer.enabled: true layer.samples: 4 // Outer gray arc: ShapePath { fillColor: "transparent" strokeColor: "gray" strokeWidth: 20 capStyle: ShapePath.RoundCap PathAngleArc { centerX: 100; centerY: 100 radiusX: 100-20/2; radiusY: 100-20/2 startAngle: 135 sweepAngle: 270 } } // Inner blue arc: ShapePath { fillColor: "transparent" strokeColor: "blue" strokeWidth: 20 capStyle: ShapePath.RoundCap PathAngleArc { centerX: 100; centerY: 100 radiusX: 100-20/2; radiusY: 100-20/2 startAngle: 135 sweepAngle: 180 } } } [image: 512e5cf8-7b1e-4b4c-aa93-d98a1b78f9c0.png] You can also use already implemented customizable QML Circular Slider: https://github.com/arunpkqt/CircularSlider Best Regards