title: Python PyQt5 passing class variables without re-opening window
body: <p>I want to pass a variable to my main window from a different class without reopening my main window. this is my current code, but it keeps re-opening the window.</p>
  
  <pre class="lang-py prettyprint-override"><code>from PyQt5.QtMultimediaWidgets import *
  from PyQt5.QtMultimedia import *
  from PyQt5.QtWidgets import *
  from PyQt5.QtCore import *
  from PyQt5.QtGui import *
  from PyQt5 import *
  import sys
  class HoverButton(QPushButton):
      def __init__(self, name, parent=None):
          self.name = name
          QPushButton.__init__(self, name, parent)
          self.setMouseTracking(True)
  
      def mouseMoveEvent(self, event):
          print (self.name)
          self.mm = MainMenu()
          self.mm.lastHoverdButton = self.name
  class MainMenu(QWidget):
      def __init__(self, parent = None):
          # super().__init__()
          super(MainMenu, self).__init__(parent)
          self.lastHoverdButton = ''
          self.btnOpen = HoverButton('Hello World', self)
          self.btnOpen.move(100,100)
  
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      main = MainMenu()
      main.show()
      sys.exit(app.exec_())
  
  </code></pre>
  
  <p>My expected result, would be to not re-open the main window, and still get variable updated somehow. I assume you could somehow use Threads? I'm not sure how you would do this.</p>