比如添加一个按钮,背景色,边框,边角,文本颜色
QPushButton{background-color: rgb(255, 255, 0);border:1px groove gray;border-radius:5px;color:black;
}
悬停状态:浅蓝色,其他的不变
QPushButton::hover{background: rgb(237, 240, 243);border:1px groove gray;border-radius:5px;color:black;
}
按下状态:文本被压下去的动态效果
QPushButton::pressed { padding-left:6px;padding-top:6px;
}