PDA

View Full Version : How to set an attribute without affecting children?



dominate
15th February 2011, 15:58
Hi,

I have a MainWindow, and this MainWindow has a QLabel as its child.
I am loading a Pixmap to this QLabel, which is a picture read from a .png file with transparent background. Until now, every thing is fine.
But, when I set a background color for MainWindow, it is automatically reflected to its child, QLabel, so that now QLabel has also a background with color, which corrupts the transparency of the background of the Pixmap.
How can I keep the Pixmap background as transparent, while setting a background color to its parent?

Thank you for help..