title: How exactly does addStretch work in QBoxLayout?
body: <p>I'm doing a PyQt4 tutorial about box layouts. But I dont understand how <code>addStretch</code> works.</p>
  
  <ul>
  <li>If i use <code>vbox.addStretch(1)</code> and <code>hbox.addStretch(1)</code>, the two buttons appear down-right. Why?  </li>
  <li>if i comment <code>vbox.addStretch(1)</code> and <code>hbox.addStretch(1)</code> out, the two buttons appear in the center of my window, and they're deformable horizontally, but not vertically. Why?   </li>
  <li>theres no difference if I change the value "1"... so what does the value do?  </li>
  </ul>
  
  <p>Below is the code I'm using:</p>
  
  <pre><code>import sys
  from PyQt4 import QtGui
  
  class BoxLayout(QtGui.QWidget):
      def __init__(self, parent=None):
          QtGui.QWidget.__init__(self, parent)
  
          self.setWindowTitle('box layout')
  
          ok = QtGui.QPushButton("OK")
          cancel = QtGui.QPushButton("Cancel")
  
          vbox = QtGui.QHBoxLayout()
          vbox.addStretch(1)
          vbox.addWidget(ok)
          vbox.addWidget(cancel)
  
          hbox = QtGui.QVBoxLayout()
          hbox.addStretch(1)
          hbox.addLayout(vbox)
  
          self.setLayout(hbox)
  
          self.resize(100, 100)
  
  app = QtGui.QApplication(sys.argv)
  qb = BoxLayout()
  qb.show()
  sys.exit(app.exec_())
  </code></pre>