Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved Ruler for measuring distance

    General and Desktop
    1
    2
    634
    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.
    • R
      RJM93 last edited by RJM93

      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

      1 Reply Last reply Reply Quote 0
      • R
        RJM93 last edited by

        Up of issue

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