今天发现一个问题,Qt Qpushbutton设置背景色只能用代码如下设置,
StyleSheet在qt creator中居然只能设置前景色!!!
pushbutton->setStyleSheet("background-color:rgb(234,234,234)");
如下使用palette也无法设置背景色!
QPalette P=pushbutton->palette();
P.setColor(QPalette::