import sys
from PyQt5.QtWidgets import QApplication,QWidget,QMainWindow
import Ui_Home
if __name__ == '__main__':
app = QApplication(sys.argv)
MainWindow = QMainWindow()
ui = Ui_Home.Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(906, 600)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 906, 23))
self.menubar.setObjectName("menubar")
self.menu = QtWidgets.QMenu(self.menubar)
self.menu.setObjectName("menu")
self.menu_2 = QtWidgets.QMenu(self.menubar)
self.menu_2.setObjectName("menu_2")
self.menu_3 = QtWidgets.QMenu(self.menubar)
self.menu_3.setObjectName("menu_3")
self.menu_4 = QtWidgets.QMenu(self.menubar)
self.menu_4.setObjectName("menu_4")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.toolBar = QtWidgets.QToolBar(MainWindow)
self.toolBar.setObjectName("toolBar")
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.actionOpenFile = QtWidgets.QAction(MainWindow)
self.actionOpenFile.setObjectName("actionOpenFile")
self.actionNewFile = QtWidgets.QAction(MainWindow)
self.actionNewFile.setObjectName("actionNewFile")
self.actionSaveFile = QtWidgets.QAction(MainWindow)
self.actionSaveFile.setObjectName("actionSaveFile")
self.menu.addAction(self.actionOpenFile)
self.menu.addAction(self.actionNewFile)
self.menu.addAction(self.actionSaveFile)
self.menubar.addAction(self.menu.menuAction())
self.menubar.addAction(self.menu_2.menuAction())
self.menubar.addAction(self.menu_3.menuAction())
self.menubar.addAction(self.menu_4.menuAction())
self.toolBar.addAction(self.actionOpenFile)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionNewFile)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionSaveFile)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.menu.setTitle(_translate("MainWindow", "文件"))
self.menu_2.setTitle(_translate("MainWindow", "预处理"))
self.menu_3.setTitle(_translate("MainWindow", "数值分析"))
self.menu_4.setTitle(_translate("MainWindow", "神经网络"))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))
self.actionOpenFile.setText(_translate("MainWindow", "打开"))
self.actionNewFile.setText(_translate("MainWindow", "新建"))
self.actionSaveFile.setText(_translate("MainWindow", "保存"))
|