1-----layout通过使用setcontentmargins来设置四周留白的间隔
函数原型:void QLayout::setContentsMargins ( int left, int top, int right, int bottom )
layout1->setContentsMargins(1,0,1,0);
2-----layout可以使用 setspacing设置控件之间的间隔;注:设置无效的可能原因有,总布局里添加控件的时候设置了比例,如图所示,去掉那个比例就可以了.
3------