How best to integrate OpenGL into a Window with Widgets
-
Hello, returning to Qt after a long hiatus.
I want write a small application consisting of a Main window with menubar, toolbar, statusbar, and an OpenGL surface inside it.
I'm somewhat confused about the options. I appears that QOpenGLWindow is for a pure window without any of the aforementioned "bars". Would QOpenGLWidget be the right choice for me? And if so, could you give me rough idea on how to integrate it into my application's window/widget hierarchy? I don't need any details about OpenGL or the event-loop itself.
I'm using QT 5.10.
Thanks!
-
Just subclass QopenGLWidget the way it describes in the documentation, and use it teh way you would any other QWidget by adding it to your layout. You only need to use QOpenGLWindow if you are making something that doesn't involve Widgets.