Do I understand correctly that you first try to draw something using OpenGL commands and then you call updateGL()? Shouldn't you store the image data somewhere and call updateGL, so that painGL() can draw everything?

Read this: QGLWidget::makeCurrent().