title: Qt empty space column in QGridLayout?
body: <p>I have the following code where I place a button and a text box in a <code>QGridLayout</code>. PLease notice that I use columns 3 and 4 for placing these. </p>
  
  <pre><code>    QGridLayout *insAddPanel = new QGridLayout();
      {
          QLineEdit* ledInstrumentName = new QLineEdit();
          insAddPanel-&gt;addWidget(ledInstrumentName, 0, 3);
  
          QPushButton* btnAddInstrument = new QPushButton();
          btnAddInstrument-&gt;setText("Add");
          insAddPanel-&gt;addWidget(btnAddInstrument, 0, 4);
      }
      mainLayout-&gt;addLayout(insAddPanel);
      ......
  </code></pre>
  
  <p>However when I run this, I get something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/sm5Rj.png" alt="enter image description here"></p>
  
  <p>I wanted the text edit and the button to occupy only 2/5 of the available horizontal space. That is why I placed these in 3rd and 4th column. As this does not work, how do I get this done? Is there something like an empty space widget in Qt? I searched but did not find it.</p>