QT QPushButton 通过stylesheet 设置样式

来源:互联网 发布:swift完整项目源码 编辑:程序博客网 时间:2024/05/10 14:55


通过QPushButton 的 stylesheet 设置按钮样式:

ui->pushButton->setStyleSheet("QPushButton{background-color:rgba(255,178,0,100%);\                                            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; }"   // 鼠标按下的色彩


0 0
原创粉丝点击