Qt QPushButton 背景色

正常状态:黑底(背景色),白字(前景色),圆角,向外凸起
鼠标停留:背景和前景反色
鼠标按下:背景色变为淡蓝色,向内凹陷

ui->pushButton->setStyleSheet("QPushButton{background-color:black; color: white; border-radius:10px; border:2px groove gray; border-style: outset;}"
"QPushButton:hover{background-color:white; color: black;}"
"QPushButton:pressed{background-color:rgb(85, 170, 255);\
    border-style: inset;}");
posted @ 2017-04-24 00:04  thomas_blog  阅读(1375)  评论(0编辑  收藏  举报