2 Answers
2

Take a look at http://doc.qt.io/archives/4.6/opengl-2dpainting.html for an instructive example, where you can also find the following quote: "it is possible to re-implement its [QGLWidget] paintEvent() and use QPainter to draw on the device, just as you would with a QWidget. The only difference is that the painting operations will be accelerated in hardware if it is supported by your system's OpenGL drivers."

So, the answer to your first question is yes.

For figuring out the exact details of the implementation, let's take a quick peek at a piece of source-code from QOpenGLPaintEngine (which can be found by searching the internet) :