def __init__(self): self.app = QApplication(sys.argv) # 图片资源路径 PixmapCache.addSearchPath("res") self.project = Project() self.win = WinMain( self.project )
class Application: def __init__(self): self.app = QApplication(sys.argv) # 图片资源路径 PixmapCache.addSearchPath("res") self.project = Project() self.win = WinMain( self.project ) def start(self): self.win.show() sys.exit(self.app.exec_())