Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Use QPainter to make a RadialBar with range

    QML and Qt Quick
    1
    1
    200
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      DavidM29 last edited by DavidM29

      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.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post