Adjust Spacing and Margins between Widgets in Layout
To adjust margins and spacing betweens use the following methods and that are implemented in class .
This code snippet shows how to remove spacing and margins between widgets in instance of.
pLayout = new QVBoxLayout(this);
// This is redundant with setMargin,
// which is deprecated
pLayout->addWidget(m_pLabel, 0, Qt::AlignTop);
pLayout->addWidget(m_pButton, 0, Qt::AlignTop);