一、QBoxLayout
包括QHBoxLayout、QVBoxLayout
QHBoxLayout:
QVBoxLayout:
二、QGridLayout
三、QFormLayout
不能在mainwindow上直接布局,必须在mainwindow中放置一个widget,在这个widget菜鸟进行布局。
QWidget *widget = new QWidget(); this->setCentralWidget(widget);