Is there a way to change the background color of a QPushButton which is pressed by modifying its QPalette object? I realize it can be done with style sheets but would like a way to do it by modifying the QPalette. Something similar to how one changes the background color of the button when not pressed:
QPushButton myButton;
QPalette p(myButton.palette());
p.setColor(QPalette::Button, QColor("#ffffff"));
myButton.setPalette(p);