I’m starting a C++ project using OpenGL and Qt for the UI in eclipse. I would like to create a UI where a portion of the window contains a frame for OpenGL rendering and the rest would contain other Qt widgets such as buttons and so on.
I haven’t used Qt or the GUI editor in eclipse before and I’m wondering what the best approach would be? Should I create the UI by hand coding or would it be easier to use eclipse’s GUI designer – I had a quick look at this and there doesn’t seem to be an OpenGL widget built in.
Thanks
If you are using Qt Designer (which I think is available via Eclipse Integration), you can place a base QWidget in the layout and then “promote” that widget to a QGLWidget. To do this:
This way you don’t have to go through the placeholder route and create an additional layer.