PySide2 QMainWindow loaded from ui file not triggering window events
问题 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. This is the 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 =