Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.5, 6.6
-
None
-
Tested with Windows11
Description
Since Qt 6.5 we have top level windows showing incorrectly opaque in our application.
Here's a minimal repro:
QWindow window;
// implicitly required windows platform window to be layered
window.setColor(Qt::transparent);
window.setFlags(Qt::FramelessWindowHint);
window.setFlags(Qt::NoDropShadowHint);
window.setFlags(Qt::WindowStaysOnTop);
window.show();
When we build against Qt 6.3 this window show totally transparent, as intended. Since Qt 6.5 the window shows an opaque white. Some debugging reveals that the windows platform window is no longer created without the `WS_EX_LAYERED` style, although I haven't got to the bottom of why this is.
The following change fixes the issue:
QWindow window; // implicitly required windows platform window to be layered window.setColor(Qt::transparent); window.setFlags(Qt::FramelessWindowHint); // window.setFlags(Qt::NoDropShadowHint); // window.setFlags(Qt::WindowStaysOnTop); window.show();
Thanks.