This commit is contained in:
bgArray 2022-12-29 17:47:22 +08:00
parent b04c01772f
commit dc1efc9e84
4 changed files with 748 additions and 0 deletions

88
1.py Normal file
View File

@ -0,0 +1,88 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file '1.ui'
##
## Created by: Qt User Interface Compiler version 6.4.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QMainWindow, QMenuBar, QSizePolicy,
QStatusBar, QTabWidget, QToolButton, QVBoxLayout,
QWidget)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(800, 600)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
self.verticalLayoutWidget_2 = QWidget(self.centralwidget)
self.verticalLayoutWidget_2.setObjectName(u"verticalLayoutWidget_2")
self.verticalLayoutWidget_2.setGeometry(QRect(0, 0, 861, 681))
self.verticalLayout_2 = QVBoxLayout(self.verticalLayoutWidget_2)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.tabWidget = QTabWidget(self.verticalLayoutWidget_2)
self.tabWidget.setObjectName(u"tabWidget")
self.tab = QWidget()
self.tab.setObjectName(u"tab")
self.toolButton_2 = QToolButton(self.tab)
self.toolButton_2.setObjectName(u"toolButton_2")
self.toolButton_2.setGeometry(QRect(30, 10, 24, 22))
self.tabWidget.addTab(self.tab, "")
self.tab_2 = QWidget()
self.tab_2.setObjectName(u"tab_2")
self.tabWidget.addTab(self.tab_2, "")
self.verticalLayout_2.addWidget(self.tabWidget)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QMenuBar(MainWindow)
self.menubar.setObjectName(u"menubar")
self.menubar.setGeometry(QRect(0, 0, 800, 26))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QStatusBar(MainWindow)
self.statusbar.setObjectName(u"statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
self.toolButton_2.clicked.connect(self.toolButton_2.click)
self.tabWidget.setCurrentIndex(0)
QMetaObject.connectSlotsByName(MainWindow)
# setupUi
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
self.toolButton_2.setText(QCoreApplication.translate("MainWindow", u"...", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab),
QCoreApplication.translate("MainWindow", u"Tab 1", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2),
QCoreApplication.translate("MainWindow", u"Tab 2", None))
# retranslateUi
if __name__ == "__main__":
import sys
from PySide6 import QtWidgets
app = QtWidgets.QApplication(sys.argv) # 创建一个QApplication也就是你要开发的软件app
MainWindow = QtWidgets.QMainWindow() # 创建一个QMainWindow用来装载你需要的各种组件、控件
# MainWindow = QtWidgets.QWidget() # 创建一个QMainWindow用来装载你需要的各种组件、控件
ui = Ui_MainWindow() # ui是你创建的ui类的实例化对象
ui.setupUi(MainWindow) # 执行类中的setupUi方法方法的参数是第二步中创建的QMainWindow
MainWindow.show() # 执行QMainWindow的show()方法显示这个QMainWindow
sys.exit(app.exec_()) # 使用exit()或者点击关闭按钮退出QApplication

91
1.ui Normal file
View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="verticalLayoutWidget_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>861</width>
<height>681</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<widget class="QToolButton" name="toolButton_2">
<property name="geometry">
<rect>
<x>30</x>
<y>10</y>
<width>24</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>26</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections>
<connection>
<sender>toolButton_2</sender>
<signal>clicked()</signal>
<receiver>toolButton_2</receiver>
<slot>click()</slot>
<hints>
<hint type="sourcelabel">
<x>44</x>
<y>76</y>
</hint>
<hint type="destinationlabel">
<x>46</x>
<y>71</y>
</hint>
</hints>
</connection>
</connections>
</ui>

313
PySide6-Pkg.ui Normal file
View File

@ -0,0 +1,313 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>951</width>
<height>611</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabO">
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<widget class="QWidget" name="verticalLayoutWidget_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>881</width>
<height>591</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTableWidget" name="tableWidget"/>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>30</y>
<width>281</width>
<height>131</height>
</rect>
</property>
<widget class="QWidget" name="verticalLayoutWidget_3">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>271</width>
<height>131</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="widget_2" native="true">
<property name="geometry">
<rect>
<x>280</x>
<y>30</y>
<width>281</width>
<height>131</height>
</rect>
</property>
<widget class="QWidget" name="verticalLayoutWidget_4">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>271</width>
<height>131</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_11">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="widget_3" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>781</width>
<height>171</height>
</rect>
</property>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>621</width>
<height>24</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_14">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox"/>
</item>
<item>
<widget class="QToolButton" name="toolButton">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_2">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>241</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_15">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="horizontalSlider">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>页</string>
</attribute>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>页</string>
</attribute>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>26</height>
</rect>
</property>
<widget class="QMenu" name="menu">
<property name="title">
<string>文件</string>
</property>
<addaction name="action"/>
<addaction name="action_Input"/>
</widget>
<addaction name="menu"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="action">
<property name="icon">
<iconset theme="document-open"/>
</property>
<property name="text">
<string>打开 Open</string>
</property>
</action>
<action name="action_Input">
<property name="text">
<string>导入 Input</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>

256
pp.py Normal file
View File

@ -0,0 +1,256 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'PySide6-Pkg.ui'
##
## Created by: Qt User Interface Compiler version 6.4.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient,
QCursor, QFont, QFontDatabase, QGradient,
QIcon, QImage, QKeySequence, QLinearGradient,
QPainter, QPalette, QPixmap, QRadialGradient,
QTransform)
from PySide6.QtWidgets import (QApplication, QComboBox, QHBoxLayout, QHeaderView,
QLabel, QMainWindow, QMenu, QMenuBar,
QSizePolicy, QSlider, QStatusBar, QTabWidget,
QTableWidget, QTableWidgetItem, QToolButton, QVBoxLayout,
QWidget)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(800, 600)
self.action = QAction(MainWindow)
self.action.setObjectName(u"action")
icon = QIcon(QIcon.fromTheme(u"document-open"))
self.action.setIcon(icon)
self.action_Input = QAction(MainWindow)
self.action_Input.setObjectName(u"action_Input")
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
self.verticalLayoutWidget = QWidget(self.centralwidget)
self.verticalLayoutWidget.setObjectName(u"verticalLayoutWidget")
self.verticalLayoutWidget.setGeometry(QRect(0, 0, 951, 611))
self.verticalLayout = QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.tabO = QTabWidget(self.verticalLayoutWidget)
self.tabO.setObjectName(u"tabO")
self.tab = QWidget()
self.tab.setObjectName(u"tab")
self.verticalLayoutWidget_2 = QWidget(self.tab)
self.verticalLayoutWidget_2.setObjectName(u"verticalLayoutWidget_2")
self.verticalLayoutWidget_2.setGeometry(QRect(0, 0, 881, 591))
self.verticalLayout_2 = QVBoxLayout(self.verticalLayoutWidget_2)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.tableWidget = QTableWidget(self.verticalLayoutWidget_2)
self.tableWidget.setObjectName(u"tableWidget")
self.verticalLayout_2.addWidget(self.tableWidget)
self.tabO.addTab(self.tab, "")
self.tab_2 = QWidget()
self.tab_2.setObjectName(u"tab_2")
self.label = QLabel(self.tab_2)
self.label.setObjectName(u"label")
self.label.setGeometry(QRect(10, 10, 71, 16))
self.widget = QWidget(self.tab_2)
self.widget.setObjectName(u"widget")
self.widget.setGeometry(QRect(0, 30, 281, 131))
self.verticalLayoutWidget_3 = QWidget(self.widget)
self.verticalLayoutWidget_3.setObjectName(u"verticalLayoutWidget_3")
self.verticalLayoutWidget_3.setGeometry(QRect(10, 0, 271, 131))
self.verticalLayout_3 = QVBoxLayout(self.verticalLayoutWidget_3)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
self.label_2 = QLabel(self.verticalLayoutWidget_3)
self.label_2.setObjectName(u"label_2")
self.verticalLayout_3.addWidget(self.label_2)
self.label_4 = QLabel(self.verticalLayoutWidget_3)
self.label_4.setObjectName(u"label_4")
self.verticalLayout_3.addWidget(self.label_4)
self.label_5 = QLabel(self.verticalLayoutWidget_3)
self.label_5.setObjectName(u"label_5")
self.verticalLayout_3.addWidget(self.label_5)
self.label_7 = QLabel(self.verticalLayoutWidget_3)
self.label_7.setObjectName(u"label_7")
self.verticalLayout_3.addWidget(self.label_7)
self.label_6 = QLabel(self.verticalLayoutWidget_3)
self.label_6.setObjectName(u"label_6")
self.verticalLayout_3.addWidget(self.label_6)
self.label_3 = QLabel(self.verticalLayoutWidget_3)
self.label_3.setObjectName(u"label_3")
self.verticalLayout_3.addWidget(self.label_3)
self.widget_2 = QWidget(self.tab_2)
self.widget_2.setObjectName(u"widget_2")
self.widget_2.setGeometry(QRect(280, 30, 281, 131))
self.verticalLayoutWidget_4 = QWidget(self.widget_2)
self.verticalLayoutWidget_4.setObjectName(u"verticalLayoutWidget_4")
self.verticalLayoutWidget_4.setGeometry(QRect(10, 0, 271, 131))
self.verticalLayout_4 = QVBoxLayout(self.verticalLayoutWidget_4)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)
self.label_9 = QLabel(self.verticalLayoutWidget_4)
self.label_9.setObjectName(u"label_9")
self.verticalLayout_4.addWidget(self.label_9)
self.label_8 = QLabel(self.verticalLayoutWidget_4)
self.label_8.setObjectName(u"label_8")
self.verticalLayout_4.addWidget(self.label_8)
self.label_10 = QLabel(self.verticalLayoutWidget_4)
self.label_10.setObjectName(u"label_10")
self.verticalLayout_4.addWidget(self.label_10)
self.label_12 = QLabel(self.verticalLayoutWidget_4)
self.label_12.setObjectName(u"label_12")
self.verticalLayout_4.addWidget(self.label_12)
self.label_13 = QLabel(self.verticalLayoutWidget_4)
self.label_13.setObjectName(u"label_13")
self.verticalLayout_4.addWidget(self.label_13)
self.label_11 = QLabel(self.verticalLayoutWidget_4)
self.label_11.setObjectName(u"label_11")
self.verticalLayout_4.addWidget(self.label_11)
self.widget_3 = QWidget(self.tab_2)
self.widget_3.setObjectName(u"widget_3")
self.widget_3.setGeometry(QRect(10, 160, 781, 171))
self.horizontalLayoutWidget = QWidget(self.widget_3)
self.horizontalLayoutWidget.setObjectName(u"horizontalLayoutWidget")
self.horizontalLayoutWidget.setGeometry(QRect(0, 0, 621, 24))
self.horizontalLayout = QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.label_14 = QLabel(self.horizontalLayoutWidget)
self.label_14.setObjectName(u"label_14")
self.horizontalLayout.addWidget(self.label_14)
self.comboBox = QComboBox(self.horizontalLayoutWidget)
self.comboBox.setObjectName(u"comboBox")
self.horizontalLayout.addWidget(self.comboBox)
self.toolButton = QToolButton(self.horizontalLayoutWidget)
self.toolButton.setObjectName(u"toolButton")
self.horizontalLayout.addWidget(self.toolButton)
self.horizontalLayoutWidget_2 = QWidget(self.widget_3)
self.horizontalLayoutWidget_2.setObjectName(u"horizontalLayoutWidget_2")
self.horizontalLayoutWidget_2.setGeometry(QRect(0, 20, 241, 31))
self.horizontalLayout_2 = QHBoxLayout(self.horizontalLayoutWidget_2)
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
self.label_15 = QLabel(self.horizontalLayoutWidget_2)
self.label_15.setObjectName(u"label_15")
self.horizontalLayout_2.addWidget(self.label_15)
self.horizontalSlider = QSlider(self.horizontalLayoutWidget_2)
self.horizontalSlider.setObjectName(u"horizontalSlider")
self.horizontalSlider.setOrientation(Qt.Horizontal)
self.horizontalLayout_2.addWidget(self.horizontalSlider)
self.tabO.addTab(self.tab_2, "")
self.tab_3 = QWidget()
self.tab_3.setObjectName(u"tab_3")
self.tabO.addTab(self.tab_3, "")
self.tab_4 = QWidget()
self.tab_4.setObjectName(u"tab_4")
self.tabO.addTab(self.tab_4, "")
self.verticalLayout.addWidget(self.tabO)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QMenuBar(MainWindow)
self.menubar.setObjectName(u"menubar")
self.menubar.setGeometry(QRect(0, 0, 800, 26))
self.menu = QMenu(self.menubar)
self.menu.setObjectName(u"menu")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QStatusBar(MainWindow)
self.statusbar.setObjectName(u"statusbar")
MainWindow.setStatusBar(self.statusbar)
self.menubar.addAction(self.menu.menuAction())
self.menu.addAction(self.action)
self.menu.addAction(self.action_Input)
self.retranslateUi(MainWindow)
self.tabO.setCurrentIndex(1)
QMetaObject.connectSlotsByName(MainWindow)
# setupUi
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
self.action.setText(QCoreApplication.translate("MainWindow", u"\u6253\u5f00 Open", None))
self.action_Input.setText(QCoreApplication.translate("MainWindow", u"\u5bfc\u5165 Input", None))
self.tabO.setTabText(self.tabO.indexOf(self.tab), QCoreApplication.translate("MainWindow", u"Tab 1", None))
self.label.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_2.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_4.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_5.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_7.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_6.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_3.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_9.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_8.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_10.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_12.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_13.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_11.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.label_14.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.toolButton.setText(QCoreApplication.translate("MainWindow", u"...", None))
self.label_15.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
self.tabO.setTabText(self.tabO.indexOf(self.tab_2), QCoreApplication.translate("MainWindow", u"Tab 2", None))
self.tabO.setTabText(self.tabO.indexOf(self.tab_3), QCoreApplication.translate("MainWindow", u"\u9875", None))
self.tabO.setTabText(self.tabO.indexOf(self.tab_4), QCoreApplication.translate("MainWindow", u"\u9875", None))
self.menu.setTitle(QCoreApplication.translate("MainWindow", u"\u6587\u4ef6", None))
# retranslateUi
if __name__ == "__main__":
import sys
from PySide6 import QtWidgets
app = QtWidgets.QApplication(sys.argv) # 创建一个QApplication也就是你要开发的软件app
MainWindow = QtWidgets.QMainWindow() # 创建一个QMainWindow用来装载你需要的各种组件、控件
# MainWindow = QtWidgets.QWidget() # 创建一个QMainWindow用来装载你需要的各种组件、控件
ui = Ui_MainWindow() # ui是你创建的ui类的实例化对象
ui.setupUi(MainWindow) # 执行类中的setupUi方法方法的参数是第二步中创建的QMainWindow
MainWindow.show() # 执行QMainWindow的show()方法显示这个QMainWindow
sys.exit(app.exec_()) # 使用exit()或者点击关闭按钮退出QApplication