Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
e453484bca5add5973602044ff0fbc224f819a07
Description
Right now QQuickWidget and QOpenGLWidget cannot be transparent since the textures for these widgets are always drawn first. The textured quad containing the rest of the backingstore (the normal widgets) comes last, with blending enabled, with a transparent "hole" punched into it for the special widgets.
This is fine for allowing arbitrary stacking orders, as long as transparency for the texture-based widgets is not needed.
If there is a sufficient demand for having (semi-)transparent QOpenGLWidget and QQuickWidgets on top of other widgets, it could be supported by some opt-in mechanism. In this mode, the "hole punching" in QWidgetPrivate::drawWidget would be skipped and QPlatformBackingStore::composeAndFlush would blit the textures belonging to such widgets after, not before, the backing store's texture, with blending enabled.
This of course breaks other kinds of stacking (normal widgets on top of texture widgets for example) so it must remain a special, opt-in mode on a per-widget basis (Qt::WA_AlwaysStackOnTop for example).