title: PyQt 4 : setupUi() unbound method error
body: <p>I am starting to learn to use PyQt4. I've got a simple gui window I want to show (nothing fancy).</p>
  
  <p>Here's the code for that : </p>
  
  <pre><code>import sys
  from PyQt4 import QtGui
  from test import Ui_MainWindow
  
  class MyForm(QtGui.QMainWindow):
     def __init__(self, parent=None):
         QtGui.QWidget.__init__(self, parent)
         self.ui = Ui_MainWindow
         self.ui.setupUi(self)          
  
  if __name__ == "__main__":
  
      app = QtGui.QApplication(sys.argv)
      myapp = MyForm()
      myapp.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>But eclipse is giving me following error:</p>
  
  <pre><code>TypeError: unbound method setupUi() must be called with Ui_MainWindow instance
  as first argument (got MyForm instance instead)
  </code></pre>
  
  <p>Any suggestions?</p>