From f2da457860133d41fafeb1ea82031327e85bdb01 Mon Sep 17 00:00:00 2001 From: atse Date: Thu, 29 Aug 2024 10:36:18 +0800 Subject: [PATCH] Move command line host:port setting handling To main --- pytec/tec_qt.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index bc682b7..d832dbb 100755 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -156,13 +156,6 @@ class MainWindow(QtWidgets.QMainWindow): self.loading_spinner.hide() - if args.connect: - if args.HOST: - self.host_set_line.setText(args.HOST) - if args.PORT: - self.port_set_spin.setValue(int(args.PORT)) - self.connect_btn.click() - def clear_graphs(self): self.channel_graphs.clear_graphs() @@ -443,6 +436,13 @@ async def coro_main(): main_window = MainWindow(args) main_window.show() + if args.connect: + if args.HOST: + main_window.host_set_line.setText(args.HOST) + if args.PORT: + main_window.port_set_spin.setValue(int(args.PORT)) + main_window.connect_btn.click() + await app_quit_event.wait()