QT控件常见样式设置
边框:border
圆角:border-radius
透明度:backgound-color的最后一个参数
QT控件代码设置样式:ui->button->setStyleSheet(" ");
QPushButton的三种状态
QPushButton
{
border:1px solid rgb(22, 22, 43);
border-radius:4px;
color: rgb(255, 255, 255);
background-color: rgb(90, 90, 137,0.3);
}
QPushButton:pressed
{
border:1px solid rgb(22, 22, 43);
border-radius:4px;
color: rgb(255, 255, 255);
background-color: rgb(90, 90, 137,0.1);
}
QPushButton:hover
{
border:1px solid rgb(22, 22, 43);
border-radius:4px;
color: rgb(255, 255, 255);
background-color: rgb(90, 90, 137,0.6);
}