一片冰心在玉壶

那时我们有梦,关于文学,关于爱情,关于穿越世界的旅行, 如今我们深夜饮酒,杯子碰到一起,都是梦破碎的声音. 交往都是初逢,爱情都在心里,往事都在梦中, 希望都带着注释,信仰都带着呻吟. 总有善意的光逃避现世的繁琐而寻找片刻的安宁, 也许,就是你凝视这里的眼睛

博客园 首页 联系 订阅 管理

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

 

百度没百出来,最后用google

在这里:

http://stackoverflow.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;}");

 

 
posted on 2013-11-27 11:22  Sankye  阅读(1027)  评论(0编辑  收藏  举报