QLayout::setContentsMargins() and QWidget::setContentsMargins().

And please attach images here at the forum that your post stays consistent.