Skip to content
  • Qtquick\Qml Arc

    Unsolved QML and Qt Quick
    4
    0 Votes
    4 Posts
    2k Views
    ndiasN

    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 } } }

    8aa108e1-c336-46a0-a39e-af38847fdfed-image.png

    You can also use already implemented customizable QML Circular Slider:

    https://github.com/arunpkqt/CircularSlider

    Best Regards