Ubuntu 如何更改Qt按钮中的焦点颜色(高亮显示颜色)?

Ubuntu 如何更改Qt按钮中的焦点颜色(高亮显示颜色)?,ubuntu,qt5,Ubuntu,Qt5,如何改变按钮的焦点颜色,如我在附图中所述 我还更改了按钮的背景色,并尝试使用调色板,但按钮仍然没有更改,请帮助我解决此问题。使用样式表: QPushButton:focus:pressed{ background-color: some_colour; } QPushButton:focus{ background-color: some_other_colour; } 您可以使用Qt Creator将样式添加到按钮中,也可以通过在按钮上调用setStyleSheet(“…”)将样式加载到代码

如何改变按钮的焦点颜色,如我在附图中所述

我还更改了按钮的背景色,并尝试使用调色板,但按钮仍然没有更改,请帮助我解决此问题。

使用样式表:

QPushButton:focus:pressed{ background-color: some_colour; }
QPushButton:focus{ background-color: some_other_colour; }
您可以使用Qt Creator将样式添加到按钮中,也可以通过在按钮上调用
setStyleSheet(“…”
)将样式加载到代码中。

可能重复的