Qt 样式表
qtabwidget样式表
QWidget{
background-color: rgb(108, 117, 125, 65);
}
QTabBar::tab{
font-family:Consolas; /*设置tab中的文本的字体*/
max-width: 150px;
min-width:120px;
min-height:20px;
font:14px;
color: rgb(108, 117, 125, 65);
border-top-left-radius: 5px; /*设置tab的边框的圆角(左上圆角)*/
border-top-right-radius: 5px; /*设置tab的边框的圆角(右上圆角)*/
padding: 5px;
}
/*设置TabWidget中QTabBar的tab被选中时的样式*/
QTabBar::tab:selected{
color:#ced4da;
background-color: rgb(108, 117, 125, 65);
}
/*设置TabWidget中鼠标悬浮在QTabBar的tab上,但未选中该Tab的样式*/
QTabBar::tab:hover:!selected {
background-color: rgb(108, 117, 125, 45);
}
/*设置TabWidget的边框的样式*/
QTabWidget::pane {
border: 1px solid rgb(108, 117, 125, 65);
}
/*当打开多个tab,右侧出现,点击后,可以向前向后的按钮的样式*/
QTabBar QToolButton {
border: none;
color: rgb(255, 206, 6);
background-color: #0b0e11;
}
QTabBar QToolButton:hover {
background-color: #161a1e;
}
qpushbutton
QPushButton
{
border-radius:3px;
color:black;
border:1px solid white;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 rgb(255,255,255,65),stop:1 rgb(255,255,255));
}
QPushButton:hover{
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 rgb(255,255,255,65),stop:1 rgb(255,255,255,200));
}
QPushButton:pressed{
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 rgb(255,255,255,65),stop:1 rgb(255,255,255,170));
}

浙公网安备 33010602011771号