:Widget控件轻松实现窗体镶嵌,
【源码目录】窗口箱套├── firsta.py
├── index.py
└── second.py
0 directories, 3 files
def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.pushButton.setText(_translate("MainWindow", "界面1")) self.pushButton_2.setText(_translate("MainWindow", "界面2")) def change(self, name): if name == "pushButton": self.splitter.widget(1).setParent(None) self.splitter.insertWidget(1, self.first) if name == "pushButton_2": self.splitter.widget(1).setParent(None) self.splitter.insertWidget(1, self.second)
评论