PDA

View Full Version : QGLWidget in QGraphicsProxyWidget



pkj
12th September 2011, 07:32
I have to use QGLwidget in QGraphicsProxyWidget. However it is clearly mentioned in documentation, that it is not possible since qglwidget paints directly to the screen or something.
Going through this thread http://www.qtcentre.org/threads/17103-Adding-QGraphicsProxyWidget-items-into-QGraphicsScene it is said i need to add a custom widget with a GL context where you will render its content to a pixel buffer and then render the resulting pixmap as the item in graphics view.
But I am not able to understand what is GL context or how do I go ahead GL painting into image, and using image to paint on widget.

high_flyer
12th September 2011, 14:42
But I am not able to understand what is GL context
http://www.opengl.org/wiki/Context

how do I go ahead GL painting into image, and using image to paint on widget.
See QPainter documentation for that.