Qt QPushButton 背景色
2017-04-24 00:03
363 查看
正常状态:黑底(背景色),白字(前景色),圆角,向外凸起
鼠标停留:背景和前景反色
鼠标按下:背景色变为淡蓝色,向内凹陷
鼠标停留:背景和前景反色
鼠标按下:背景色变为淡蓝色,向内凹陷
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;}");
相关文章推荐
- Qt Qpushbutton设置背景色的问题
- Qt 使用QPalette设置Qpushbutton背景色的问题
- QT QPushButton 通过stylesheet 设置样式
- Qt QPushButton 无法触发 toggled
- QT5编程提示QObject::connect: No such slot QPushButton::renameButton()
- Qt QPushButton圆形图片设置为背景
- QT控件提升之QPushButton提升为QMenu
- Qt 之 QPushButton Class
- qt的qpushbutton的基本qss 用法
- Qt入门之QPushButton
- QT控件提升之QPushButton提升为QMenu
- Qt: qobject_cast<QPushButton*>(sender()) 简化信号与槽的编写
- 2、QT分析之QPushButton的初始化
- QT 入门 -QApplication QPushButton QDialog Ui类型的手工使用
- QT QPushButton 通过stylesheet 设置样式
- Qt中使用QGridLayout 使QPushButton占两行
- QT 设置QPushButton 颜色
- Qt: qobject_cast<QPushButton*>(sender()) 简化信号与槽的编写
- Qt鼠标移入时改变QPushButton图标和颜色
- QT QPushButton点击事件的实现