QPushButton is not changing the background-color proper
问题 I have a problem with a QPushButton. I use QT 4.8 and the Designer. I configured the button to be "flat" and "checkable". The button should be red if not checked and green if checked. To style the button I use a stylesheet. QPushButton:default{ background-color: red; color: red; } QPushButton:checked{ background-color: green; color: black; } Now the problem. If the button is unchecked it is gray. When I press the button he turns green like it should. I tried different other pseudo-states,