mainLayout=newQVBoxLayout(this);

mainLayout->setMargin(30);  //表示控件与窗体的左右边距
mainLayout->setSpacing(40); //表示各个控件之间的上下间距