Qt常见皮肤qss代码


##QTabWidget

  • 淡蓝色效果TabWidget(属性值lightblue)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
QTabWidget[lightblue = "true"] QTabBar::tab{
border-top:1px solid rgb(249,249,249);
border-top-left-radius: 4px;
border-top-right-radius: 4px;
max-height:20px;
min-height:20px;
min-width:95px;
font-family:microsoft yahei;
color:rgb(50,50,50);
font-size:13px;
padding:0px 0px 0px 0px;
border-image:url();
margin: 0px;
padding-bottom:15px;
}
QTabWidget[lightblue = "true"] QTabBar::tab:selected{
border-left:1px solid rgb(192,215,250);
border-right:1px solid rgb(192,215,250);
border-top:1px solid rgb(192,215,250);
color:rgb(50,50,50);
background-color:rgb(249,249,249);
font-size:13px;
border-image:url();
margin: 0px;
}
QTabWidget[lightblue = "true"]::pane {
border-top: 1px solid rgb(192,215,250);
position: absolute;
top: -1px;
}

效果如下图所示:
QTableWidget

##QLabel

  • 蓝色标题Label(属性值blueTitle)
1
2
3
4
5
6
7
8
QLabel[blueTitle="true"]
{
font-size:18px;
font-family:Microsoft YaHei;
color:rgb(255,255,255);
background-color:rgb(5 ,112, 183 );
padding-left:25px;
}

效果图如下所示:

    • blueTitleLabel
  • 淡灰色标题Label(属性值lightgrayTitle)
1
2
3
4
5
6
7
QLabel[lightgrayTitle="true"]
{
font-family:Microsoft YaHei;
font-size:16px;
background-color: rgb(207, 207, 207);
padding-left: 25px;
}

效果图如下所示:

    • lightGrayTitleLabel

##QPushbutton

  • 蓝色按钮(属性值blueButton)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
QPushButton[blueButton="true"]
{
color:rgb(255,255,255);
border-radius:3px;
background-color:rgb(0,109,204);
font-family:Arial;
}
QPushButton[blueButton="true"]:hover
{
background-color:rgb(0 ,119, 224 );
}
QPushButton[blueButton="true"]:pressed
{
background-color:rgb(0 ,149 ,255 );
}

效果图如下所示:

    • blueButton
  • 蓝框按钮(属性值)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
QPushButton[blueBorderButton = "true"]
{
border:1px solid;
border-color:#afafaf;
font-family:microsoft yahei;
color:#555555
}
QPushButton[blueBorderButton = "true"]:hover
{
border:1px solid;
border-color:#11a9d6;
font-family:microsoft yahei;
color:#555555
}
QPushButton[blueBorderButton = "true"]:pressed
{
background-color:#11a9d6;
border:1px solid;
border-color:#afafaf;
font-family:microsoft yahei;
color:white
}
```
效果图如下所示:
*
*
![blueButton](/res/img/blog/皮肤模块说明文档的资源文件/blueBorderButton.png)
![blueBorderButton_normal](/res/img/blog/皮肤模块说明文档的资源文件/blueBorderButton_normal.png)
![blueBorderButton_push](/res/img/blog/皮肤模块说明文档的资源文件/blueBorderButton_push.png)
## QProgressBar
> * 淡红色进度条
```css
QProgressBar[redProgressBar = "true"]{
color : solid gray;
border: 2px solid gray;
border-radius: 5px;
background: transparent;
padding: 0px;
text-align : center ;
}
QProgressBar[redProgressBar = "true"]::chunk{
background: #B22222;
}
    • redProgressBar
daodaoliang wechat
点击上面图片后用微信扫描,你就能认识一个有趣的灵魂了呀。
Fork me on GitHub