24 lines
780 B
Python
24 lines
780 B
Python
# This Python file uses the following encoding: utf-8
|
||
import sys
|
||
from PySide2.QtWidgets import QApplication
|
||
from PySide2.QtWidgets import QApplication
|
||
from PySide2.QtWidgets import QMainWindow
|
||
from mainwindow import Ui_MainWindow # 加载我们的布局
|
||
|
||
|
||
class UsingTest(QMainWindow, Ui_MainWindow):
|
||
def __init__(self, *args, **kwargs):
|
||
super(UsingTest, self).__init__(*args, **kwargs)
|
||
self.setupUi(self) # 初始化ui
|
||
# 在这里,可以做一些UI的操作了,或者是点击事件或者是别的
|
||
# 也可以另外写方法,可以改变lable的内容
|
||
|
||
if __name__ == "__main__":
|
||
import sys
|
||
from PySide2.QtWidgets import QApplication, QLabel
|
||
|
||
app = QApplication(sys.argv)
|
||
mw = UsingTest()
|
||
mw.show()
|
||
app.exec_()
|