解决了。当初可能是因为和其他属性冲突
QSlider::handle:vertical
{
height: 12px;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 255, 255, 255), stop:1 rgba(122, 122, 122, 255));
margin: 0 -2px;
border-radius:5px;
}
QSlider::handle:vertical:hover
{
height: 12px;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 255, 255, 255), stop:1 rgba(255, 0, 0, 255));
margin: 0 -2px;
border-radius:5px;
}