[Interest] Stacking QOpenGLWidgets

Uwe Rathmann Uwe.Rathmann at tigertal.de
Wed Jan 27 16:09:29 CET 2016


Hi all,

I'm trying to create an application with several QOpenGLWidgets ( no 
regular QWidgets involved ), where some of them are on top of others.

My first results are promising, but I couldn't find out how to enable a
transparent background for the widgets on top. I would like to have a
similar effect as with setAutoFillBackground( false ) - seeing pixels
from the widget below.

But I also couldn't get setAutoFillBackground(true) working and had to
fill widgets myself in paintGL(). As it is explicitly mentioned in
the docs ( http://doc.qt.io/qt-5/qopenglwidget.html ) I guess it
is something wrong on my side.

When having a regular widget on top of a QOpenGLWidget everything works 
like expected, but with QOpenGLWidget the background is always black.

Has someone ever tried this or knows if it is possible to set up 
QOpenGLWidget not drawing a background at all ?

I'm using the Qt 5.6 beta from December.

Thanks a lot,
Uwe




More information about the Interest mailing list