horizontal水平,将horizontal改成vertical就是垂直样式
水平滑杆
QSlider::groove:horizontal{
height:8px;
border-radius:4px;
background:#E4E4E4;
}
QSlider::add-page:horizontal{
height:8px;
border-radius:4px;
background:#E4E4E4;
}
QSlider::sub-page:horizontal{
height:8px;
border-radius:4px;
background:#B6B6B6;
}
QSlider::handle:horizontal{
width:13px;
margin-top:-3px;
margin-bottom:-3px;
border-radius:6px;
background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 #FFFFFF,stop:0.8 #B6B6B6);
}
水平滚动条
QScrollBar:horizontal{
background:#E4E4E4;
padding:0px;
border-radius:6px;
max-height:12px;
}
QScrollBar::handle:horizontal{
background:#B6B6B6;
min-width:50px;
border-radius:6px;
}
QScrollBar::handle:horizontal:hover{
background:#575959;
}
QScrollBar::handle:horizontal:pressed{
background:#575959;
}
QScrollBar::add-page:horizontal{
background:none;
}
QScrollBar::sub-page:horizontal{
background:none;
}
QScrollBar::add-line:horizontal{
background:none;
}
QScrollBar::sub-line:horizontal{
background:none;
}
水平进度条
QProgressBar{
min-height:10px;
background:#E4E4E4;
border-radius:5px;
text-align:center;
border:1px solid #E4E4E4;
}
QProgressBar:chunk{
border-radius:5px;
background-color:#B6B6B6;
}