Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 2

Draw a Ruler using QtOpenGL

Solved! Go to Solution.

Hello Everyone, i'm trying to draw a ruler using QtOpenGL, just something like this:
ruler.PNG
And as a beginner, i can't figure out how to do it or with what i can start to draw it
So if any one has a basic example, i really appriciate it. Thank you

1 Reply
Solution
Copilot Lvl 2
Message 2 of 2

Re: Draw a Ruler using QtOpenGL

QtOpenGL is basically just a viewport wrapped in a Qt widget.  You would need to do your drawing using OpenGL shaders.  There are probably 1000 ways to do what you are looking for, but the easiest would just be to upload the texture to the graphics card and draw it on a single quad or something like that.  Making it accurate would probably require probing for some hardware information regarding screen size and resolution, but some of that may actually be simplified by Qt in your case.