Den 11-09-2012 15:20, Sensei skrev: > 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 > pixmap.
You're on the right track, but you have to modify the image opacity directly. There's no way to modify how transparent a label is. The two QLabel approach is the right one. Bo Thorsen. Fionia Software - Qt experts for hire. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest