title: How to set QGridLayout in particular position after removing one of its widget
body: <p>I am using <code>QGridLayout</code> to add one <code>QPushButton</code> and one <code>QTextEdit</code>. but whenever i am hiding and removing <code>QTextEdit widget</code> then <code>QPushButton</code> is coming on the position of <code>QTextEdit</code>.</p>
  
  <p>Initially <code>QPushButton</code> is in position lets say <code>(0,0)</code> and <code>QTextEdit</code> is in position <code>(100,0)</code>. Then on removing <code>QTextEdit QPushButton</code> is coming on <code>QTextEdit</code> position ie, at position <code>(100,0)</code>.</p>
  
  <pre><code>layout-&gt;addWidget(button1,0,0,1,1, Qt::AlignCenter);
  layout-&gt;addWidget(text1,0,1,1,1); 
  </code></pre>
  
  <p>On pressing delete key i am removing QTextWidget:</p>
  
  <pre><code>layout-&gt;removeWidget(text1);
  </code></pre>
  
  <p>So i think i have to set the position of <code>QGridLayout</code> so that everytime after removing <code>widget</code> it should be in its proper position.</p>
  
  <p><img src="https://i.stack.imgur.com/Dnvch.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/QDnQm.png" alt="enter image description here"></p>