A window, several components
-
I would like to create a window where I can have a OpenGL or SDL rendering part, and it shares with other parts which are normal window, like a list of users or a console.
Something like this:
http://s11.postimg.org/drmg7ptub/gui.pngIs it possible?.
[Edit sierdzio: fixed link]
-
Certainly. Basically, you have one top level widget, which has a layout. Each of the "regions" is a widget that is added to the layout. For OpenGL rendering, you can use a QGLWidget and handle drawing isnide of it however you want. SDL would probably be a lot more difficult to integrate into a Qt app though. Depending on what exactly you want to do, it may be impossible. Basically, you need to have SDL draw directly onto a native winID, which may behave differently on different platforms, and you need to avoid using SDL for input handling...
http://qt-project.org/doc/qt-5/layout.html
http://qt-project.org/doc/qt-5/QGLWidget.html
http://stackoverflow.com/questions/118659/how-do-i-use-qt-and-sdl-together
http://qt-project.org/doc/qt-4.8/qwidget.html#winId