Ruler for measuring distance



  • Greetings all =)
    Im creating application based on math calculations with visualisation. Im working with QGLWidget to render results of calculation. The result looks like on the scrennshot.
    I need to mesuare lenght of this shape whick is presented on screenshot. For these purposes i need to create a ruler which will measure lenght, width... The idea is to choose first point by mouse, afterfrom this point draw line to the next point and finish drawing after choosing second point.

    I tried to make implementation of ruler with openGL, but its difficult and i leave this idea. Also i tried with QRubberBand - wrong way too... Moreover i tried to use QPainter... but i didnt find how to use it in correct way with QGLWidget.

    Maybe someone knows how to realise tool like this. Also i will be grateful for code example.

    Thank you guys for your attention!
    alt text



  • Up of issue


Log in to reply
 

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