【发布时间】:2014-02-13 04:19:30
【问题描述】:
我正在尝试在按下按钮时更改按钮的颜色,并且看起来可以直接在样式表中完成,而无需执行功能然后连接它。
在 http://qt.developpez.com/doc/4.7-snapshot/stylesheet-examples/ 显示这个例子:
QPushButton#evilButton {
background-color: red;
border-style: outset;
border-width: 2px;
border-radius: 10px;
border-color: beige;
font: bold 14px;
min-width: 10em;
padding: 6px;
}
QPushButton#evilButton:pressed {
background-color: rgb(224, 0, 0);
border-style: inset;
}
如何将它翻译成 python pyqt?
【问题讨论】:
标签: button colors pyqt stylesheet