Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Ruler for measuring distance
Qt 6.11 is out! See what's new in the release blog

Ruler for measuring distance

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 1.1k Views
  • 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 Offline
    R Offline
    RJM93
    wrote on last edited by RJM93
    #1

    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
    0
    • R Offline
      R Offline
      RJM93
      wrote on last edited by
      #2

      Up of issue

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved