Hello everyone,
My problem is simple: my checked (not pressed) QPushButton background color (setted with stylesheet) is not displayed as wanted; it looks like a Qt::Dense6Pattern is present.
I tried to modify the stylesheet with different selectors, but no luck for now.
Below is the simplest code.
int main(int argc, char *argv[]){
b1.setCheckable(true);
b1.setChecked(true);
b1.setStyleSheet("QPushButton {background-color: blue;}");
win.show();
return app.exec();
}
int main(int argc, char *argv[]){
QApplication app(argc, argv);
QMainWindow win;
QPushButton b1("Button 1", &win);
b1.setCheckable(true);
b1.setChecked(true);
b1.setStyleSheet("QPushButton {background-color: blue;}");
win.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Does this issue ring a bell ?
Thanks !
Bookmarks