Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.15.0
-
None
Description
It is not possible to set the background color of a flat QPushButton using style sheets.
Example:
QPushButton* button = new QPushButton(); button->setFlat(true); button->setStyleSheet("QPushButton:flat { background: yellow; }");
The backgronud is set to yellow only when the button is pressed.
If I remove the flat pseudo state in the style sheet, it does not change anything.
But if I set the border to none, the background is set to yellow correctly:
button->setStyleSheet("QPushButton:flat { background: yellow; border: none; }"); //OK