📜  设置宽度 qpushbutton - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:51.751000             🧑  作者: Mango

代码示例1
//Use this:

QPushButton* const button = new QPushButton(QString("<"), this); 
const QSize BUTTON_SIZE = QSize(22, 22);
button->setMinimumSize(BUTTON_SIZE);

//or:

button->setSize(BUTTON_SIZE);

//or:

button->setMinimumSize(BUTTON_SIZE);