chezifresh
18th December 2009, 20:02
I'm making an OpenGL widget with some Qt controls sitting on top of it. The OpenGL widget is used for playing back images (ie. .mov files) and the controls are playback controls.
The playback controls are parented to a vanilla QWidget (http://doc.trolltech.com/latest/qwidget.html) which is then parented to the QGLWidget (http://doc.trolltech.com/latest/qglwidget.html). I want the vanilla QWidget to have a transparent or partially transparent background so all you can see are the playback controls. I've tried the following but all I get is garbage as the background.
setBackgroundRole(QPalette::Base);
QPalette pal;
pal.setColor(QPalette::Base, QColor(Qt::transparent));
setPalette(pal);Is there a good way to integrate a QWidget into an OpenGL? Any widget attributes or paint engine tricks? Essentially I want to make the playback controls look like they're painted as an overlay in OpenGL.
FYI I do not have a compositing window manager :(
The playback controls are parented to a vanilla QWidget (http://doc.trolltech.com/latest/qwidget.html) which is then parented to the QGLWidget (http://doc.trolltech.com/latest/qglwidget.html). I want the vanilla QWidget to have a transparent or partially transparent background so all you can see are the playback controls. I've tried the following but all I get is garbage as the background.
setBackgroundRole(QPalette::Base);
QPalette pal;
pal.setColor(QPalette::Base, QColor(Qt::transparent));
setPalette(pal);Is there a good way to integrate a QWidget into an OpenGL? Any widget attributes or paint engine tricks? Essentially I want to make the playback controls look like they're painted as an overlay in OpenGL.
FYI I do not have a compositing window manager :(