Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946
Minimal [QGLWidget + ui] code
Arty.McLabin last edited by
Hello Fellas, i started learning OpenGL2 recently and trying to understand how to implement it inside a Qt project, i know there are many tutorials and examples out there, but i didn't manage to find the minimal requirments (some kind of a "(0,0) dot" for an opengl in Qt) including both QWidget and QGLWdget (inside the previous).
i ask for the shortest example for a code to implement that QGLWidget (empty, no need for geometry) to fit inside a .ui form, for Qt5. The simpler the better to understand. thanks in advance and cheers.
I recommend using "QOpenGLWidget":http://doc.qt.io/qt-5/qopenglwidget.html from Qt 5.4. QGLWidget is now deprecated.
See the "beginners' tutorial":http://doc.qt.io/qt-5/gettingstartedqt.html for creating a widget project. Jump down to "Using Qt Designer", and replace the "Text Edit" with "OpenGL Widget".