title: How to make a function in one class implement another class?
body: <p>I am creating a GUI with a code like this:</p>
  
  <pre><code>    class MyClass2(QtGui.QMainWindow):
  
          def __init__(self, win_parent = None):
  
  
          def on_blahblah_clicked(x):
  
  
      if __name__ == "__main__":
           # Someone is launching this directly
           # Create the QApplication
            app = QtGui.QApplication(sys.argv)
           #The Main window
           main_window = HyperlinkWindow()
           main_window.show()
  # Enter the main loop
  app.exec_()
  </code></pre>
  
  <p>And I have a code for an add-in button like this:</p>
  
  <pre><code>    class MyClass(object):
          """Impementation of Some_addin.button (Button)"""
          def __init__(self):
              #Code here
          def onClick(self):
              # Code
              pass
  </code></pre>
  
  <p>I want to create an add-in button that when clicked it brings out the GUI created above. So I want to be able to call the class of the GUI code, MyClass2 in function onClick. Just like I do with a in y in the code below:</p>
  
  <pre><code>    class x:
          a = 1 + 1
      class y:
          print x.a
  </code></pre>