Hi everyone! I'm trying to connect to the new OpenGL. But success is not achieved.

All I managed to do is create a new project and will place on it OpenGLWidget. What to do next I don't know.

In example on opengl entire interface is created from the code without the use Qt designer. This option is not suitable for me. I'm placed OpenGLWidget and some buttons then I want to draw triangles or other primitives. No success. How to initialize OpenGL? Where I can place draw functions?

I would be grateful for any help.