Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Open GL - Drawing A square by clicking a button
Jisha last edited by
I am a very beginner in openGL. What I need is to create a button and on clicking that I should be able to draw a square as we do in Microsoft Paint program.
Hi and welcome to the forums.
You can start by getting to know
as that is the minimum setup you need with shaders etc to show something/anything.
Then step 2 would to modify code to draw recatangle and then step 3
is trying to do it with the mouse if that what you mean by "like in Ms Paint"
You will need some understanding of openGL and basic elements like vertices etc