赞
踩
pip install Pyside6
PySide6-uic SedentaryReminder.ui -o ui_SedentaryReminder.py
- # -*- coding: utf-8 -*-
-
- ################################################################################
- ## Form generated from reading UI file 'SedentaryReminder.ui'
- ##
- ## Created by: Qt User Interface Compiler version 6.6.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, QCheckBox, QLCDNumber, QLabel,
- QMainWindow, QPushButton, QSizePolicy, QSpinBox,
- QSplitter, QWidget)
-
- class Ui_MainWindow(object):
- def setupUi(self, MainWindow):
- if not MainWindow.objectName():
- MainWindow.setObjectName(u"MainWindow")
- MainWindow.resize(260, 300)
- MainWindow.setMinimumSize(QSize(260, 300))
- MainWindow.setMaximumSize(QSize(260, 300))
- self.centralwidget = QWidget(MainWindow)
- self.centralwidget.setObjectName(u"centralwidget")
- self.label_2 = QLabel(self.centralwidget)
- self.label_2.setObjectName(u"label_2")
- self.label_2.setGeometry(QRect(37, 143, 48, 20))
- font = QFont()
- font.setPointSize(12)
- font.setBold(True)
- self.label_2.setFont(font)
- self.label = QLabel(self.centralwidget)
- self.label.setObjectName(u"label")
- self.label.setGeometry(QRect(31, 21, 64, 20))
- self.label.setFont(font)
- self.label.setMouseTracking(True)
- self.ifLock = QCheckBox(self.centralwidget)
- self.ifLock.setObjectName(u"ifLock")
- self.ifLock.setGeometry(QRect(60, 169, 151, 20))
- self.ifLock.setMouseTracking(True)
- self.ok = QPushButton(self.centralwidget)
- self.ok.setObjectName(u"ok")
- self.ok.setGeometry(QRect(90, 200, 71, 23))
- self.splitter = QSplitter(self.centralwidget)
- self.splitter.setObjectName(u"splitter")
- self.splitter.setGeometry(QRect(61, 50, 161, 21))
- self.splitter.setOrientation(Qt.Horizontal)
- self.label_3 = QLabel(self.splitter)
- self.label_3.setObjectName(u"label_3")
- self.splitter.addWidget(self.label_3)
- self.workTime = QSpinBox(self.splitter)
- self.workTime.setObjectName(u"workTime")
- self.splitter.addWidget(self.workTime)
- self.label_5 = QLabel(self.splitter)
- self.label_5.setObjectName(u"label_5")
- self.splitter.addWidget(self.label_5)
- self.splitter_2 = QSplitter(self.centralwidget)
- self.splitter_2.setObjectName(u"splitter_2")
- self.splitter_2.setGeometry(QRect(61, 79, 161, 21))
- self.splitter_2.setOrientation(Qt.Horizontal)
- self.label_4 = QLabel(self.splitter_2)
- self.label_4.setObjectName(u"label_4")
- self.splitter_2.addWidget(self.label_4)
- self.restTime = QSpinBox(self.splitter_2)
- self.restTime.setObjectName(u"restTime")
- self.splitter_2.addWidget(self.restTime)
- self.label_6 = QLabel(self.splitter_2)
- self.label_6.setObjectName(u"label_6")
- self.splitter_2.addWidget(self.label_6)
- self.time = QLCDNumber(self.centralwidget)
- self.time.setObjectName(u"time")
- self.time.setGeometry(QRect(60, 240, 131, 41))
- MainWindow.setCentralWidget(self.centralwidget)
-
- self.retranslateUi(MainWindow)
-
- QMetaObject.connectSlotsByName(MainWindow)
- # setupUi
-
- def retranslateUi(self, MainWindow):
- MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"\u4e45\u5750\u63d0\u9192", None))
- self.label_2.setText(QCoreApplication.translate("MainWindow", u"\u9009\u9879\uff1a", None))
- self.label.setText(QCoreApplication.translate("MainWindow", u"\u8ba1\u65f6\u5668\uff1a", None))
- self.ifLock.setText(QCoreApplication.translate("MainWindow", u"\u4f11\u606f\u65f6\u5c4f\u853d\u952e\u76d8\u548c\u9f20\u6807", None))
- self.ok.setText(QCoreApplication.translate("MainWindow", u"\u5f00\u59cb", None))
- self.label_3.setText(QCoreApplication.translate("MainWindow", u"\u5de5\u4f5c\u65f6\u95f4\uff1a", None))
- self.label_5.setText(QCoreApplication.translate("MainWindow", u"\uff08\u5206\u949f\uff09", None))
- self.label_4.setText(QCoreApplication.translate("MainWindow", u"\u4f11\u606f\u65f6\u95f4\uff1a", None))
- self.label_6.setText(QCoreApplication.translate("MainWindow", u"\uff08\u5206\u949f\uff09", None))
- # retranslateUi
- from PySide6.QtWidgets import QApplication, QMainWindow
- from ui_SedentaryReminder import Ui_MainWindow
-
-
- class MainWindow(QMainWindow):
- def __init__(self):
- super(MainWindow, self).__init__()
- self.ui = Ui_MainWindow() # UI类的实例化
- self.ui.setupUi(self)
-
-
- if __name__ == '__main__':
- app = QApplication([]) # 启动一个应用
- window = MainWindow() # 实例化主窗口
- window.show() # 展示主窗口
- app.exec() # 避免程序执行到这一行后直接退出
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。