Hi, i have a problem using QSS on a QWidget.
I would like to display a image above the text of a QPushButton.
Actually my code is :
// Constructor() {
setText("Push Button Text");
styleSheet.append("QPushButton{");
styleSheet.append("background-image: url(images/image.jpg);");
styleSheet.append("background-repeat: no-repeat;");
styleSheet.append("background-position: center;");
styleSheet.append("}");
setStyleSheet(styleSheet);
// }
// Constructor() {
setText("Push Button Text");
QString styleSheet;
styleSheet.append("QPushButton{");
styleSheet.append("background-image: url(images/image.jpg);");
styleSheet.append("background-repeat: no-repeat;");
styleSheet.append("background-position: center;");
styleSheet.append("}");
setStyleSheet(styleSheet);
// }
To copy to clipboard, switch view to plain text mode
Because it's background-image, it's under the text...
If i change "background-image" to "image", the image does not appear ! 
how to put the image above the text, centered on the QPushButton please ?
?
Bookmarks