I have created a MainOpenGLWidget class that inherits from QOpenGLWidget and is a layer (I use it in QtDesigner) that has a paintGL()