参考demo
from PyQt5.QtWidgets import QApplication, QMainWindow
from home import Ui_homewindow
import sys
from run_classificatin import *
from Reptile_translate.run_translate import *
from detection.main import *
class run_home(QMainWindow,Ui_homewindow):
def __init__(self):
super(run_home,self).__init__()
self.setupUi(self)
self.retranslateUi(self)
self.imageButton.clicked.connect(self.imageclassification)
self.translationButton.clicked.connect(self.translation)
self.detectionButton.clicked.connect(self.detection)
def imageclassification(self):
clawin.show()
Mainwindow.close()
def translation(self):
translationwin.show()
Mainwindow.close()
def detection(self):
detectionwin.show()
Mainwindow.close()
if __name__ == "__main__":
app = QApplication(sys.argv)
myWin =run_home()
Mainwindow= QtWidgets.QMainWindow()
translationwin=MyMainwindow()
clawin = MyMainwindow_cla()
detectionwin=Ui_MainWindow()
myWin.show()
sys.exit(app.exec_())