title: How to connect to parent SIGNAL in PyQt?
body: <p>I have a MainWindow that looks like this:</p>
  
  <pre><code>def __init__(self, parent = None):
  
      QMainWindow.__init__(self, parent)
      self.setupUi(self)
      self.showMaximized()
  
      menu=mainMenu.MainMenu()
  
      classification=classificationMain.ClassificationMain()
  
      self.stackedWidget.addWidget(menu)
      self.stackedWidget.addWidget(classification)
  
      self.stackedWidget.setCurrentWidget(menu)
      self.stackedWidget.showFullScreen()
  
      #connections
  
      menu.pushButton.clicked.connect(self.showClassification)
      classification.backButton.clicked.connect(self.showMainWindow)
  
  def showClassification(self ):
      self.stackedWidget.setCurrentIndex(3)
  
  def showMainWindow(self):
      self.stackedWidget.setCurrentIndex(2)
  </code></pre>
  
  <p>The MainWindows waits for signal from the rest of the dialogs. Now, the Classification dialog has another StackedWidget in it, since it works as a main window for an important part of the application. It looks like:</p>
  
  <pre><code>class ClassificationMain(QDialog, Ui_Dialog):
  
  def __init__(self, parent = None):
  
      QDialog.__init__(self, parent)
      self.setupUi(self)
      choose=choosePatient.ChoosePatient()
      self.stackedWidget.addWidget(choose)
      self.stackedWidget.setCurrentWidget(choose)
  </code></pre>
  
  <p>Now, I want to reload the data inside ChoosePatient every time the button "Show Classification" from MainMenu is clicked, but now the data is loaded only once in the line classification=classificationMain.ClassificationMain() of MainWindow.</p>
  
  <p>I was thinking I had to connect a slot inside ChoosePatient with the click of "Show Classification" button inside MainMenu, but I would need an instance of MainMenu, which is not possible.</p>
  
  <p>How can a method of ChoosePatient can be execute every time the button in the "parent" window is clicked? (also, please tell me if this is not the right way to work with pyqt windows)</p>