title: PyQt GridLayout combining widgets
body: <p>so for example, I have a GUI that has a <code>label1</code>+<code>line_edit1</code>, <code>label2</code>+<code>line_edit2</code>, <code>button1</code>, <code>button2</code>, <code>button3</code>. In a normal sense the code would look somewhat like this:</p>
  
  <pre><code>class gridlayout_example(QtGui.QWidget):
      def __init__(self):
          self.grid_layout = QtGui.QGridLayout()
  
          self.label1 = QtGui.QLabel("label1")
          self.grid_layout.addWidget(self.label1,0,0,1,3)
  
          self.line_edit1 = QtGui.QLineEdit()
          self.grid_layout.addWidget(self.line_edit1,1,0,1,3)
  
          self.label2 = QtGui.QLabel("label2")
          self.grid_layout.addWidget(self.label1,2,0,1,3)
  
          self.line_edit2 = QtGui.QLineEdit()
          self.grid_layout.addWidget(self.line_edit2,3,0,1,3)
  
          self.button1 = QtGui.QPushButton("button1")
          self.button2 = QtGui.QPushButton("button2")
          self.button3 = QtGui.QPushButton("button3")
  
          self.grid_layout.addWidget(self.button1, 4,0,1,1)
          self.grid_layout.addWidget(self.button2, 4,1,1,1)
          self.grid_layout.addWidget(self.button3, 4,2,1,1)
  
          self.setLayout(self.grid_layout)
  </code></pre>
  
  <p>But is there a way to combine <code>label1</code>+<code>line_edit1</code> and <code>label2</code> + <code>line_edit2</code> so it becomes something like:</p>
  
  <pre><code>[label1                    
   line edit1               ] -&gt; (0,0,1,3)
  [label2                    
   line edit2               ] -&gt; (1,0,1,3)
  [button1][button2][button3] -&gt; (2,x,1,1)
  </code></pre>
  
  <p>so basically label1+line edit1 would occupy row 0 of the grid layout, label2 + line edit2 occupy row1 and so on...</p>