from PyQt5.QtWidgets import QApplication from frame.win import Win class App(QApplication): # 扩展QApplication类 def __init__(self): #实现构造器 super(App,self).__init__([]) # 调用父类构造器(参数: 命令行参数) # 调用win self.win = Win() self.win.show()