This function should take care of setting any required OpenGL context rendering flags, defining display lists, etc. I.e. makes this widget's rendering context the current OpenGL rendering context. Handles paint events. This virtual function is called whenever the widget needs to be painted. Reimplement it in a subclass.
Handles resize events.
Reimplemented from QWidget. This virtual function is called whenever the widget has been resized. Reimplement it in a subclass. The context must be created using new. QGLWidget will delete the context when another context is set or when the widget is destroyed.