函数原型: void QLayout::setContentsMargins(int left, int top, int right, int bottom) 作用: 设置左侧、顶部、右侧和底部边距,以便在布局周围使用。 如下图: