你可以给我推荐几个好看的QSlider样式表,要横板的,不要竖的
时间: 2023-03-20 10:02:13 浏览: 141
当然可以!以下是一些我认为不错的横向 QSlider 样式表,你可以根据需要进行选择和修改。
1. 漂亮的 QSlider 样式表:
```css
QSlider::groove:horizontal {
background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
stop: 0 #dadbde, stop: 1 #f6f7fa);
border: 1px solid #bbb;
height: 10px;
margin: 0px;
border-radius: 4px;
}
QSlider::handle:horizontal {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
stop:0 #eee, stop:1 #ccc);
border: 1px solid #777;
width: 20px;
margin: -2px 0;
border-radius: 4px;
}
QSlider::sub-page:horizontal {
background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
stop: 0 #7bbfea, stop: 1 #a6c1ee);
border: 1px solid #444;
height: 10px;
border-radius: 4px;
}
QSlider::add-page:horizontal {
background: #fff;
border: 1px solid #444;
height: 10px;
border-radius: 4px;
}
```
2. 水晶 QSlider 样式表:
```css
QSlider::groove:horizontal {
border: 1px solid #bbb;
background: white;
height: 10px;
border-radius: 4px;
}
QSlider::sub-page:horizontal {
background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1,
stop: 0 #c6e5f5, stop: 1 #9fb8d1);
border: 1px solid #777;
height: 10px;
border-radius: 4px;
}
QSlider::add-page:horizontal {
background: #fff;
border: 1px solid #777;
height: 10px;
border-radius: 4px;
}
QSlider::handle:horizontal {
background: qradialgradient(cx: 0.3, cy: -0.4,
fx: 0.3, fy: -0.4,
radius: 1.35,
stop: 0 #fff, stop: 1 #888);
border: 1px solid #777;
width: 14px;
height: 14px;
margin: -5px 0;
border-radius: 8px;
}
```
3. 进度条风格的 QSlider 样式表:
```css
QSlider::groove:horizontal {
height: 10px;
border-radius: 5px;
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #555, stop:1 #000);
}
QSlider::handle:horizontal {
background: qradialgradient(cx: 0.3, cy: -0.4, fx: 0
阅读全文