Take the 2-minute tour ×

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.

share|improve this question
I assume this better belongs to a bug report at Nokia. They respond fairly quick to them. –  ypnos Sep 19 '11 at 17:09
add comment

1 Answer

up vote 1 down vote accepted

Turns out that while


is good enough for OS X…

On windows you should also add:


That took care of it. Problem resolved.

share|improve this answer
add comment

Your Answer


