resizeEvent doesn't work if I use QUiLoader for QMainWindow
问题 I load main window from ui file: main_1.py from PySide import QtCore, QtGui, QtUiTools import sys class ControlMainWindow(QtGui.QMainWindow): def __init__(self, parent=None): QtGui.QMainWindow.__init__(self, parent) loader = QtUiTools.QUiLoader() file = QtCore.QFile("lat.ui") file.open(QtCore.QFile.ReadOnly) self.ui = loader.load(file) file.close def show(self): self.ui.show() def resizeEvent(self, event): print event app = QtGui.QApplication(sys.argv) MW = ControlMainWindow() MW.show() sys