1 Attachment(s)
How to set all the labels transparent using "QLabel{background:transparent}" ?
qApp->setStyleSheet("QLabel{background:transparent}") ;
lab2->setStyleSheet("background:transparent");
When I use these two statements above, there are different effects to the labels:
Attachment 11134
The first statement can't make the labels transparent. And I need to know that how to make all the labels transparent when there's a background-image on the QMainWindow?
Re: How to set all the labels transparent using "QLabel{background:transparent}" ?
Make sure autoFillBackground property of the label is set to false.
Re: How to set all the labels transparent using "QLabel{background:transparent}" ?
Thank you, wysota. I checked it again that the autoFillBackground property of the label is false. And now I set the background-image of the mainwindow in qss not in Qt-designer and this problem is disappeared:).