I really don't konw if I can help you.
I wirte a class which inherits QGLWidget. I draw my graphics in OpenGL commands in my class. And I want to draw some rotation text on my graphics,but the renderText() can not help me. So I write another class inherits QWidget in which I use QPainter to draw rotation texts. Then I set the second class' parent to the first class. Now the whole image seems good for me. The background is OpenGL graphics and the foreground is the rotation texts.
I don't know how to save them to a whole image includes background and foreground.
Thank you for your helping ,but I still not solve the problems.