PDA

View Full Version : Transparent QWidget on QGLWidget



showhand
27th October 2006, 02:03
Hi, all

Is there any way to put a transparent QWidget (QPixmap, QGLWidget etc.) on a QGLWidget?

I have tried that transparent QWidget can be put on another QWidget except QGLWidget. Does Qt not surpported?

wysota
27th October 2006, 10:36
Is there any way to put a transparent QWidget (QPixmap, QGLWidget etc.) on a QGLWidget?
Yes, there is (note that QPixmap is not a widget). But what for? If you want a pixmap on your glwidget, then just use overlays, just like one of Qt demo applications does.


I have tried that transparent QWidget can be put on another QWidget except QGLWidget. Does Qt not surpported?
In what way was it put "on" another widget? Could you show a code sample?

showhand
27th November 2006, 01:00
The demo is about QPainter in a QGLWidget. I need an another(forground) QGLWidget or QGLContext which the background is transparent. Thus, one glwidget is used to draw some background graphics and the other one draw forground graphics, although they do not impact each other. The forground QGLWidget or QGLContext's graphics look like on the background widget.

Can you give me some good advice? Thanks for any replay!!