c++qtqglwidget

How to use the QOpenGLWidget object?


I created a form for the application in Qt Designer and placed a QOpenGLWidget in it and got an openGLWidget object, but now I can't figure out how to draw with this object. I will not be able to inherit from the object to write code inside its methods and other things...


Solution

  • You are able to inherit from it. You just have to use the widget promotion mechanism in Qt Designer to promote your new QOpenGLWidget to your derived type.