title: PyQt QVBoxLayout and missing widgets?
body: <p>I am trying to set up a window that has a text input &amp; a combo box. At the moment I just want to see the text &amp; the selection displayed under the appropriate widget.</p>
  
  <p>I have used QVBoxLayout() as I will be adding more stuff later &amp; thought it would be a simple way of laying out the window.</p>
  
  <p>Unfortunately only the combo box ever gets displayed. The code:</p>
  
  <pre><code>from PyQt4 import QtCore, QtGui
  import sys
  
  class Polyhedra(QtGui.QMainWindow):
  
      def __init__(self):
          super(Polyhedra, self).__init__()
  
          self.initUI()
  
      def initUI(self): 
  
          # Poly names
          self.pNames = QtGui.QLabel(self)            
          polyNameInput = QtGui.QLineEdit(self) 
          # polyName entry
          polyNameInput.textChanged[str].connect(self.onChanged)  
  
          # Polytype selection
          self.defaultPolyType = QtGui.QLabel("Random polyhedra", self)
          polyType = QtGui.QComboBox(self)
          polyType.addItem("Random polyhedra")
          polyType.addItem("Spheres")
          polyType.addItem("Waterman polyhedra")
          polyType.activated[str].connect(self.onActivated)   
  
          # Layout
          vbox = QtGui.QVBoxLayout()
          vbox.addWidget(polyNameInput)
          vbox.addWidget(self.pNames)
          vbox.addWidget(polyType)
          vbox.addWidget(self.defaultPolyType)
          vbox.addStretch()
  
          # Set up window        
          self.setGeometry(500, 500, 300, 300)
          self.setWindowTitle('Pyticle')
          self.show()
  
      # Combo box
      def onActivated(self, text):
  
          self.defaultPolyType.setText(text)
          self.defaultPolyType.adjustSize()  
  
      # Poly names         
      def onChanged(self, text):
  
          self.pNames.setText(text)
          self.pNames.adjustSize()   
  
  def main():
  
      app = QtGui.QApplication(sys.argv)
      ex = Polyhedra()
      sys.exit(app.exec_())
  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>So whats going on here? Am I missing some important directive to QVBoxLayout()?</p>
  
  <p>Using Python 2.7 on Win 7 x64 machine with PyQt 4.</p>
  
  <p>EDIT: Additional problem (still related to missing widgets)</p>
  
  <p>I have amended the code following the clarification below. I then added more widgets when a certain option in the combobox is chosen (see below) but these widgets dont show. I attempted to add a child widget to 'widget' called 'ranPolyWidget' to take a numerical input.</p>
  
  <pre><code># Combo box
  def onActivated(self, text):
  
      if text=="Random polyhedra":
          self.randomSeedLbl = QtGui.QLabel("Seed: ", self)            
          randomSeed = QtGui.QLineEdit(self) 
          randomSeed.textChanged[str].connect(self.setSeed)
          ranPolyWidget = QtGui.QWidget(self.widget)
          rbox = QtGui.QVBoxLayout(ranPolyWidget)
          rbox.addWidget(randomSeed)
          self.layout().addWidget(ranPolyWidget)
          self.show()
      else:
          self.defaultPolyType.setText(text)
          self.defaultPolyType.adjustSize() 
  </code></pre>
  
  <p>Same issue as before, no widgets. I am missing something pretty fundamental arent I?</p>