Qt下QWizard改变next,back等默认按钮的大小及背景

默认的按钮又小又丑,想改大点漂亮点。

百度没百出来,最后用google

在这里:

http://*.com/questions/16425575/change-qwizard-buttons-size

Better is to customize user interface using QSS (Qt Style Sheet). You can read your qss file and setup stylesheet for the whole application using QApplication::setStyleSheet().

Also you can setup qss programmatically (not the best practics).

setStyleSheet("QAbstractButton { height: 50px }");

What sets height for all buttons on the widget.

In the worst case you can try this:

button(QWizard::CancelButton)->setStyleSheet("height: 50px");

我的代码:

button(QWizard::CancelButton)->setStyleSheet("QPushButton{height:40px;width:80;background-image: url(:/img/smbtd.png);border-style:flat;background-attachment:fixed;}"
"QPushButton:pressed{background-image: url(:/img/smbto.png);border-style:flat;background-attachment:fixed;}");

 
上一篇:20155205 郝博雅 Exp4 恶意代码分析


下一篇:2017-2018-2 20155327『网络对抗技术』Exp5:MSF基础应用