diff --git a/bin/GUIWindows.py b/bin/GUIWindows.py
index 79a0fd0..75b1e0f 100644
--- a/bin/GUIWindows.py
+++ b/bin/GUIWindows.py
@@ -1,13 +1,14 @@
# -*- coding:utf-8 -*-
+import sys
from pathlib import Path
-from PySide6.QtWidgets import QApplication, QMessageBox
from PySide6.QtUiTools import loadUiType
+from PySide6 import QtWidgets,QtCore
+
# 定义公共路径
path = Path(__file__)
-ui_dir = path.parent.parent / "ui"
-ui_file_patch = ui_dir / "ui_main.ui"
+ui_file_patch = path.parent.parent / "ui" / "ui_main.ui"
# 从文件中加载UI定义
formType, baseType = loadUiType(str(ui_file_patch))
@@ -18,7 +19,25 @@ class Window(formType, baseType):
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('点击了测试连接按钮')
- def handleCalc(self):
- pass
diff --git a/bin/main.py b/bin/main.py
index 95863b1..317a65e 100644
--- a/bin/main.py
+++ b/bin/main.py
@@ -4,10 +4,14 @@ import sys
from GUIWindows import Window
from PySide6.QtWidgets import QApplication
-
+from PySide6 import QtWidgets
if __name__ == '__main__':
app = QApplication([])
+ app.setStyle("Fusion")
+ # 样式
+ # print(QtWidgets.QStyleFactory.keys())
+ # print(app.style().name())
win = Window()
win.show()
sys.exit(app.exec())
diff --git a/requirements.txt b/requirements.txt
index 78c7513..1d11a79 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,4 +3,4 @@ faker==19.12.0
schedule==1.2.1
JPype1==1.4.1
JayDeBeApi==1.2.3
-
+pyside6==6.6.1
diff --git a/ui/ui_main.ui b/ui/ui_main.ui
index ba4c60b..f4a0736 100644
--- a/ui/ui_main.ui
+++ b/ui/ui_main.ui
@@ -24,7 +24,7 @@
- 0
+ 1
@@ -50,7 +50,7 @@
90
- 70
+ 80
201
31
@@ -60,7 +60,7 @@
90
- 110
+ 130
201
31
@@ -83,8 +83,8 @@
20
- 70
- 81
+ 80
+ 61
31
@@ -96,8 +96,8 @@
20
- 110
- 81
+ 130
+ 61
31
@@ -589,5 +589,58 @@
+
+ startButton
+ clicked()
+ MainWindow
+ start()
+
+
+ 98
+ 526
+
+
+ 153
+ 523
+
+
+
+
+ stopButton
+ clicked()
+ MainWindow
+ stop()
+
+
+ 431
+ 531
+
+
+ 492
+ 515
+
+
+
+
+ conn_Button
+ clicked()
+ MainWindow
+ conntest()
+
+
+ 82
+ 269
+
+
+ 287
+ 528
+
+
+
+
+ start()
+ stop()
+ conntest()
+