擅长:python、mysql、java
<p>对于那些仍然想根据说明书改变按钮颜色的人</p>
<pre><code>button.setStyleSheet('QPushButton {background-color: #A3C1DA}')
</code></pre>
<p>如果不能这样做,只需将上面的指令修改为</p>
<pre><code>button.setStyleSheet('QPushButton {background-color: #A3C1DA; border: none}')
</code></pre>
<p>它会改变按钮的颜色,所以诀窍是去掉边框</p>