QOpenGlWidget opaque areas painted with Qt::WA_AlwaysStackOnTop are transparent
-
I am currently porting a Windows Qt and OpenGl based product to MacOSX. The code base is literally millions of lines of code, so it will be hard for me to include them here.
This is QT 6.0.4, and OSX Ventura 13.1.
In the first screenshot you can see that things are working "normally". The only problem is some Z-fighting with the menus (not shown).
To solve this, I tried setting Qt::WA_AlwaysStackOnTop on the QOpenGlWidget. This fixed the issue with the menus, but all of the opaque and translucent areas are now being painted as transparent, or not being painted at all
To "prove" this, I set the background of the QOpenGlWidget to yellow, which is why the avatar's face is yellow, and the floating translucent barrels are yellowish.
A screenshot of the window hierarchy (via Qt's dumpObjectTree) is also included.
The only thing different between the two screenshots is Qt::WA_AlwaysStackOnTop.
I've tried to make a small application to reproduce this, but I can't seem to make it fail.
Does anyone has any ideas where I should look next?
Thanks!