title: PySide2 QMainWindow loaded from ui file not triggering window events
body: <p>I am loading a QMainWindow from an .ui file - it's working fine but window events like resize won't be triggered. I can't really figure out what I am doing wrong.</p>
  
  <p>This is the code:</p>
  
  <pre><code>class TestWindow(QMainWindow):
      def __init__(self, parent=None):
          super(TestWindow, self).__init__(parent)
          loader = QUiLoader()
          file = QFile(abspath("ui/mainwindow.ui"))
          file.open(QFile.ReadOnly)
          self.window = loader.load(file, parent)
          file.close()
          self.window.show()
  
      def resizeEvent(self, event):
          print "resize"
  
  app = QApplication(sys.argv)
  test = TestWindow()
  
  sys.exit(app.exec_())
  </code></pre>
  
  <p>The .ui file can be found <a href="https://kutschera.co.at/temp/mainwindow.ui" rel="nofollow noreferrer">here</a>.</p>