在Qt中利用样式表来改变PushButton的外观,在样式表编辑器中添加如下代码:
QPushButton { background-color: rgb(104, 156, 251); border-radius: 3px; color: rgb(255, 255, 255); } QPushButton:hover { background-color: rgb(0, 100, 234); }
就会成为下面的外观!
在Qt中利用样式表来改变PushButton的外观,在样式表编辑器中添加如下代码:
QPushButton { background-color: rgb(104, 156, 251); border-radius: 3px; color: rgb(255, 255, 255); } QPushButton:hover { background-color: rgb(0, 100, 234); }
就会成为下面的外观!