I know I can use setStyleSheet() to set styles in Qt. But when I use setStyleSheet() twice, the first styles are lost, which are set by first use of setStyleSheet().
For example,
setStyleSheet("QLabel{color:red;}");
setStyleSheet("QLabel{border-image:url(……)}")
When I set border-image, the red color property lost.
I tried to solve it by using:
setStyleSheet(styleSheet()+QString("QLabel{border-image:url(……)}"));
but it was the same that only the border-image property existed.
Must I add every style property when I use setStyleSheet(), although that I set it before.
Is there a way to apply this twice without overwriting prior styles?
QPushButton:pressed{}
. Any better way to figure it out? – Daggett