title: Avoid overlapping of Widgets in QVBoxLayout
body: <p>I tried to dynamically add more fields to select multiple paths in my application. Unfortunaley I am not able to get rid of the overlap that some icons have:</p>
  
  <p><a href="https://i.stack.imgur.com/ZCbuu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZCbuu.png" alt="enter image description here"></a></p>
  
  <p>I add them with the following code:</p>
  
  <pre><code>void SettingsDialog::addPathEdit(QString dir)
  {
      if (amountPaths &gt; maxAmountPaths) {
          showError(tr("Cannot add more than %1 paths").arg(maxAmountPaths));
          return;
      }
      QHBoxLayout *hLayout = new QHBoxLayout();
      hLayout-&gt;setObjectName("pathLine");
      hLayout-&gt;setSizeConstraint(QHBoxLayout::SetMinimumSize);
  
      QLineEdit *lineEdit = new QLineEdit(dir);
      lineEdit-&gt;setMinimumHeight(25);
      lineEdit-&gt;setObjectName("path");
      hLayout-&gt;addWidget(lineEdit);
  
      QPushButton *browseButton = new QPushButton(tr("Browse..."));
      browseButton-&gt;setMinimumHeight(25);
      browseButton-&gt;setObjectName("browseButton");
      hLayout-&gt;addWidget(browseButton);
      connect(browseButton, SIGNAL(clicked()), this, SLOT(on_browse_button_clicked()));
  
      ui-&gt;pathHolderLayout-&gt;addLayout(hLayout);
      amountPaths++;
  }
  </code></pre>
  
  <p>where <code>pathHolderLayout</code> is a QVBoxLayout.</p>
  
  <p>Any help is appreciated.</p>