效果图:
样式表:
QPushButton{
background-color:
qlineargradient(spread:pad,x1:0,x2:0, y1:0, y2:1,
stop: 0 rgba(130,130,130,255),
stop: 0.495 rgba(0,0,0,255),
stop: 0.505 rgba(0,0,0,255),
stop: 1 rgba(130,130,130,255));
color: rgb(255, 255, 255);
border: none;
border-radius: 5px;
color: rgb(255, 255, 255);
font: 75 12pt "微软雅黑";
}
QPushButton:hover{
background-color:
qlineargradient(spread:pad,x1:0,x2:0, y1:0, y2:1,
stop: 0 rgba(150,150,150,230),
stop: 0.495 rgba(0,0,0,230),
stop: 0.505 rgba(0,0,0,230),
stop: 1 rgba(150,150,150,230));
color: rgb(255, 255, 255);
border: none;
border-radius: 5px;
color: rgb(255, 255, 255);
font: 75 12pt "微软雅黑";
}
QPushButton:pressed{
background-color:
qlineargradient(spread:pad,x1:0,x2:0, y1:0, y2:1,
stop: 0 rgba(100,100,100,255),
stop: 0.495 rgba(0,0,0,255),
stop: 0.505 rgba(0,0,0,255),
stop: 1 rgba(100,100,100,255));
color: rgb(255, 255, 255);
border: none;
border-radius: 5px;
color: rgb(255, 255, 255);
font: 75 12pt "微软雅黑";
padding-left:2px;
padding-top:1px;
}
HHT0506 发布了34 篇原创文章 · 获赞 26 · 访问量 7593 私信 关注