Qt中给MainWindow设置布局管理:
QGridLayout *main_layout = new QGridLayout();
main_layout->addWidget(image_label);
main_layout->addWidget(centralWidget());
QWidget *widget = new QWidget(this);
widget->setLayout(main_layout);
this->setCentralWidget(widget);
Qt中给MainWindow设置布局管理:
QGridLayout *main_layout = new QGridLayout();
main_layout->addWidget(image_label);
main_layout->addWidget(centralWidget());
QWidget *widget = new QWidget(this);
widget->setLayout(main_layout);
this->setCentralWidget(widget);