2
当我的QApplication :: setStyleSheet()具有以下样式表如何设置影响按钮大小的QPushButton样式表?
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;
}
所有按钮的大小被截断为文本的大小。例如OK按钮变平方。效果与我在QPushButton上尝试的任何其他样式表相同。如何设置按钮样式表而不影响其默认大小?