title: python pyqt multiple classes
body: <p>I am writing a program where I have do the following. </p>
  
  <ol>
  <li>Get User Credentials using a Dialog Box</li>
  <li>If successful Launch another application, if Unsuccessful prompt again for credentials. 
  I am implementing this using two classes called x_LoginForm and x_Application
  The code is as follows
  class x_LoginForm(QDialog)
  Elements in Class</li>
  <li>QLineEdit to get Username</li>
  <li>QLineEdit to get Password</li>
  <li>QPushbutton to Cancel</li>
  <li>QPushbutton to Login</li>
  </ol>
  
  <p>If Login is successful, I will set a flag main_window_flag to 1
  class x_Application()</p>
  
  <p>This class will Launch a new application and provide control to the user.
  The object of this class will be instantiated if the flag main_window_flag is set to 1</p>
  
  <pre><code>main_window_flag=0
  if __name__ == "__main__": 
      app = QtGui.QApplication(sys.argv)
      form = x_LoginForm()
      form.show()
      if main_window_flag == 1:
          window = x_Application()
          window.show() 
  sys.exit(app.exec_())
  </code></pre>
  
  <p>in the class x_LoginForm 
  when I have validated I want to pass the control back to main, and instantiate an object of the x_Application class. 
  to exit from the class x_LoginForm, If I issue self.close - the entire program gets closed.</p>