QTPushbutton:悬停只工作在点击

QTPushbutton:hover only working on click

本文关键字:工作 悬停 QTPushbutton      更新时间:2023-10-16

我使用样式表样式我的qt按钮时,鼠标移动到它。然而,悬停事件只在我点击按钮时触发,当我将鼠标悬停在它上面时什么也没有发生

Trackbox { background: #FFFFFF;}
 QPushButton {
 position: fixed;
 top: 2px;
 right: 2px;
 width: 20px;
 height: 20px;
 }
 QPushButton:hover { background: #c0ffff}

任何帮助都是感激的。由于

这是一个非常简单的修复。我需要添加一个边界,0像素,悬停正常工作。谢谢你的帮助。