dataCreatingGUI/bin/GUIWindows.py

44 lines
901 B
Python
Raw Normal View History

2024-02-11 11:38:52 +00:00
# -*- coding:utf-8 -*-
import sys
2024-02-11 11:38:52 +00:00
from pathlib import Path
from PySide6.QtUiTools import loadUiType
from PySide6 import QtWidgets,QtCore
2024-02-11 11:38:52 +00:00
# 定义公共路径
path = Path(__file__)
ui_file_patch = path.parent.parent / "ui" / "ui_main.ui"
2024-02-11 11:38:52 +00:00
# 从文件中加载UI定义
formType, baseType = loadUiType(str(ui_file_patch))
class Window(formType, baseType):
def __init__(self):
super(Window, self).__init__()
self.setupUi(self)
# 输出设置
self.Log_Output.document().setMaximumBlockCount(100)
self.Log_Output.ensureCursorVisible()
@QtCore.Slot()
def start(self):
self.Log_Output.append('点击了开始按钮')
@QtCore.Slot()
def stop(self):
self.Log_Output.append('点击了停止按钮')
@QtCore.Slot()
def conntest(self):
self.Log_Output.append('点击了测试连接按钮')
2024-02-11 11:38:52 +00:00