样式一

QPushButton
{
color:#ffffff; /*文字颜色*/
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #aa55ff, stop: 1 #1296db);/*背景色*/
border-style:outset; /*边框风格*/
border-width:2px;/*边框宽度*/
border-color:#0055ff; /*边框颜色*/
border-radius:10px; /*边框倒角*/
font:bold 14px; /*字体*/
font-family: Segoe UI;
min-width:100px;/*控件最小宽度*/
min-height:20px;/*控件最小高度*/
padding:4px;/*内边距*/
}

QPushButton:hover
{
color:#ffffff; /*文字颜色*/
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #ff55ff, stop: 1 #1296db);/*背景色*/
border-style:outset; /*边框风格*/
border-width:2px;/*边框宽度*/
border-color:#0055ff; /*边框颜色*/
border-radius:10px; /*边框倒角*/
font:bold 14px; /*字体*/
font-family: Segoe UI;
min-width:100px;/*控件最小宽度*/
min-height:20px;/*控件最小高度*/
padding:4px;/*内边距*/
}
QPushButton:pressed
{
color:#ffffff; /*文字颜色*/
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #ff55ff, stop: 1 #aa00ff);/*背景色*/
border-style:outset; /*边框风格*/
border-width:2px;/*边框宽度*/
border-color:#0055ff; /*边框颜色*/
border-radius:10px; /*边框倒角*/
font:bold 14px; /*字体*/
font-family: Segoe UI;
min-width:100px;/*控件最小宽度*/
min-height:20px;/*控件最小高度*/
padding:4px;/*内边距*/
}

效果图:正常态   hover态 按下态

QPushButton样式表_背景色QPushButton样式表_最小宽度_02QPushButton样式表_背景色_03

样式二

QPushButton
{
color: #1296db;
background-color:transparent;
font: 75 10pt "微软雅黑";
}

QPushButton:hover
{
color:rgb(97 , 179 , 246);
}

QPushButton:pressed
{
color:rgb(0 , 109 , 176);
}

设置按钮背景透明:方式一

ui->pushButton->setAttribute(Qt::WA_TranslucentBackground);

设置按钮背景透明:方式二

QPushButton
{
border-style: outset;
}

效果图:正常态   hover态 按下态

QPushButton样式表_背景色_04  QPushButton样式表_背景色_05  QPushButton样式表_背景色_06