[Resolved] Strange Hover-Only transparency losing effects on a button
My Widget declares:
In its paintEvent, I set:
This gives me the ability to project a png on its entire background with some transparency. This works well.
Problem: I am adding a QPushButton with a transparent png on top of my widget. The opaque portion of the button's image (derived from Qt CSS) is shown correctly, and the transparent areas remain with my widgets' drawn background, which is already somewhat transparent. When I HOVER over the image, my css dictates that my QPushButton changes image. When that happens, the opaque portion of the button image is shown correctly, but for the transparent areas, it's as if my own widget is re-drawing the background image, only with full opacity.
This happens only on Windows. On OS X is works fine. I was wondering whether there was a bug in Windows in that respect and if there's a workaround for it.
Turns out that while
is good enough for OS X...
On windows you should also add:
That took care of it.