我在我的按钮pushButton样式表中使用了这个
QPushButton#pushButton {
background-color: yellow;
}
QPushButton#pushButton:pressed {
background-color: rgb(224, 0, 0);
}
QPushButton#pushButton:hover {
background-color: rgb(224, 255, 0);
}
当我将鼠标悬停在上面时,它会改变颜色,就像我期望的那样,但是当我按下按钮后,悬停颜色仍然存在。
我尝试改变顺序,但问题仍旧存在。
对Qt还不太熟悉。