Qt:Qss 样式设置(01)- Buttons
一、QPushButton
1. 基础设置
/* 基本样式 */
QPushButton{
border:1px solid
color:
padding:4px 20px;
}
/* 悬浮时 */
QPushButton:hover{
background:
color:
}
/* 按下时 */
QPushButton:pressed{
background:
color:
border-radius: 3px;
/* 改变边框风格 */
border-style:inset;
/* 使文字有一点移动 */
padding-left:6px;
padding-top:6px;
}
/* 按钮样式 */
QPushButton:flat {
border:2px solid red;
}
/* 当按钮打开菜单时:ui->pushButton->setMenu(btnMenu) */
QPushButton:open{
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0
}
/* 子选择器:菜单 */
QPushButton::menu-indicator {
image:url(:/res/button/close.png);
/* 去掉小三角号
image:none;*/
/* 绘制subcontrol 的参考矩形的位置 */
subcontrol-origin:padding;
/* 小三角的位