if __name__ == '__main__': app = QApplication(sys.argv) MainWindow = QMainWindow() ui = Ui_Form() ui.setupUi(MainWindow) MainWindow.show() stu_main=QMainWindow() stu_ui1=stu_ui() stu_ui1.setupUi(stu_main) ui.pushButton_4.clicked.connect(stu_main.show) sys.exit(app.exec_()) 因为我用的是ui转为py文件,所以我的ui类是在传入的窗体进行修改,每个控件的名称在ui中需要调用ui的控件名来修改。
标签:__,控件,界面,pyqt,stu,ui,跳转,main,MainWindow From: https://www.cnblogs.com/hahaah/p/17397013.html