QML Circular slider
-
-
@Naveen_D You can try the CircularGauge's styling example.
https://doc.qt.io/qt-5/styling-circulargauge.html#styling-circulargauge-background
https://doc.qt.io/qt-5/styling-circulargauge.html#styling-circulargauge-foreground -
@Naveen_D You can try the CircularGauge's styling example.
https://doc.qt.io/qt-5/styling-circulargauge.html#styling-circulargauge-background
https://doc.qt.io/qt-5/styling-circulargauge.html#styling-circulargauge-foreground -
@Naveen_D Sure. Just try customizing them as per the given links.
Here's a small example according to it:Dial { width: 200 height: 200 style: DialStyle { function degreesToRadians(degrees) { return degrees * (Math.PI / 180); } background: Canvas { onPaint: { var ctx = getContext("2d"); ctx.reset(); ctx.beginPath(); ctx.strokeStyle = "#e34c22"; ctx.lineWidth = outerRadius * 0.02; ctx.arc(outerRadius, outerRadius, outerRadius - ctx.lineWidth / 2, degreesToRadians(valueToAngle(80) - 90), degreesToRadians(valueToAngle(100) - 90)); ctx.stroke(); } } handle: Rectangle { width: outerRadius * 0.3 height: outerRadius * 0.3 radius: width/2.0 color: "green" } handleInset: outerRadius * 0.25 } } -
@Naveen_D Sure. Just try customizing them as per the given links.
Here's a small example according to it:Dial { width: 200 height: 200 style: DialStyle { function degreesToRadians(degrees) { return degrees * (Math.PI / 180); } background: Canvas { onPaint: { var ctx = getContext("2d"); ctx.reset(); ctx.beginPath(); ctx.strokeStyle = "#e34c22"; ctx.lineWidth = outerRadius * 0.02; ctx.arc(outerRadius, outerRadius, outerRadius - ctx.lineWidth / 2, degreesToRadians(valueToAngle(80) - 90), degreesToRadians(valueToAngle(100) - 90)); ctx.stroke(); } } handle: Rectangle { width: outerRadius * 0.3 height: outerRadius * 0.3 radius: width/2.0 color: "green" } handleInset: outerRadius * 0.25 } } -
@Naveen_D Can you share your solution if possible? Thanks in advance
-
@Naveen_D Can you share your solution if possible? Thanks in advance
@Ratataplam - You can glean much info from this github account. I have used this for purposes of creating speedometers;