[Interest] QLabel with images

Sensei senseiwa at gmail.com
Tue Sep 11 15:20:33 CEST 2012

Hi all,

I need to display a QLabel that has an image and text in it, in 
particular, a semi-transparent icon. All, without implementing another 
custom widget.

Googling, I found no ways of adding text and images, since one excludes 
the other. Moreover, my images are black and transparent, used for some 
QIcons I need, and I'd like to avoid creating another set of images, 
just for the transparency.

What I've done now is having two overlapping QLabels, one for the text, 
the other for the icon. Now I just need to make the icon at a certain 
alpha, but setWindowOpacity does not work on the QLabel containing the 

Any hints?

More information about the Interest mailing list