title: error in removing item in qlayout pyqt4 python
body: <p>The self.ui.verticalLayout.addWidget(MainWindow(self)) is working, But i receive an error when trying to remove the widget.</p>
  
  <p>TypeError: QLayout.removeWidget(QWidget): argument 1 has unexpected type 'PyQt4.QtCore.pyqtWrapperType'</p>
  
  <p>Here are the sample codes:</p>
  
  <p>I have this separate .py file to create widget with qtableview</p>
  
  <pre><code>class MyWindow(QWidget):
      pcobject =[]
      def __init__(self, *args):
          QWidget.__init__(self, *args)
          layout = QVBoxLayout(self)
          self.tableview = QTableView()
          layout.addWidget(self.tableview)
  ........
  </code></pre>
  
  <p>And separate .py with vertical layout to add MyWindow Class.</p>
  
  <p>-Edited</p>
  
  <pre><code>from tableview import MyWindow
  
  class QTEST(QtGui.QMainWindow):
      def __init__(self, parent=None):
          QtGui.QWidget.__init__(self, parent)
          self.table = MyWindow
          self.ui = Ui_MainWindow()
          self.ui.setupUi(self)
  
          self.ui.verticalLayout.addWidget(self.table))
          self.ui.gridLayout.addLayout(self.ui.verticalLayout, 1, 0, 1, 1)
          self.connect(self.ui.pushButton_15, QtCore.SIGNAL("clicked()"), self.table_view )
  
      def table_view(self):
  
          #import sip
  
          self.ui.verticalLayout.removeItem(self.table)
  
          #self.table.setParent(None)
          #sip.delete(self.table)
          #self.table = None
  
  if __name__ == "__main__":
      app = QtGui.QApplication(sys.argv)
      myapp = QTEST() 
      myapp.show()
      sys.exit(app.exec_())
  </code></pre>