QPushButton 的样式表代码总结
http://blog.163.com/qimo601@126/blog/static/15822093201432494134937/
QPushButton样式表
QPushButton
{
background-color: rgb(0, 120, 255);
border-radius:10px;
}
QPushButton:pressed
{
background-color: rgb(0, 0, 88);
border-radius:10px;
}
QPushButton:hover
{
background-color: rgb(0, 50, 255);
border-radius:10px;
}
上面的pressed状态设置了没效果,不知何原因。也就是按钮按下后的状态没变。
QTabWidget样式表:
QTabBar::tab{
border-top-left-radius: 12px;
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
border-bottom-left-radius: 12px;
min-width:210px;
min-height:45px;
border:1px solid blue;
margin: 10px, 20px, 10px, 10px;
}
QTabBar::tab::selected{background-color:rgb(85,158,251);}
QTabBar::tab::!selected{background-color:white;}
QTabWidget::pane{
border-width:2px;
border-top-left-radius:15px;
border-color:rgb(214,241,214);
border-style: inset;
background-color: white;
}