【发布时间】:2013-10-23 12:40:49
【问题描述】:
当我使用以下样式表进行 QApplication::setStyleSheet() 时
QPushButton {
border-radius: 2px;
padding: 0.2em 0.2em 0.3em 0.2em;
border: 1px solid rgb(100, 100, 100);
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #f4f4f4, stop:0.1 #8F8F8F, stop:1 #7B7B7B);
color: white;
}
所有按钮的大小都被截断为文本的大小。例如,确定按钮变成了方形。效果与我在 QPushButton 上尝试的任何其他样式表相同。如何在不影响默认大小的情况下设置按钮样式表?
【问题讨论】:
标签: qt stylesheet qpushbutton qtstylesheets