Use QPainter to make a RadialBar with range



  • Hello !

    I'm using this code as a base to get a radialBar from a painter : https://github.com/arunpkqt/RadialBarDemo

    This one works very good but I would like to add 2 elements to it. Those elements would be range, for example :

    I'm using this Component to watch a speed in km/h the radialBar can go from 0 to 100. I would like to add a range like 40km/h as a lower value and 60km/h as higher value. It would look like this :

    0_1530006553231_0b31ccc9-74b3-448a-a55b-7841f5d13d77-image.png

    What I need here is to find a way to draw those two line on the circle with the correct angle and the text label above it. I've never used a QPainter before so I need a little bit of help on that.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.