From 23f86a3c659f03ac7222ae319ab87badacd00cca Mon Sep 17 00:00:00 2001 From: raiots Date: Fri, 2 Jun 2023 21:01:18 +0800 Subject: [PATCH] sync --- LoraViewer/main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/LoraViewer/main.py b/LoraViewer/main.py index 12ee2ab..ca68571 100644 --- a/LoraViewer/main.py +++ b/LoraViewer/main.py @@ -2,10 +2,13 @@ import PySimpleGUI as sg import os.path +import time # First the window layout in 2 columns sg.theme('DarkAmber') # Add a touch of color +menu_def = [['Panel'], ['Debug']] + panel_view_column = [ [ sg.Text("字符识别结果:", font=("微软雅黑", 20), size=(23, 1)) @@ -18,7 +21,9 @@ panel_view_column = [ # ----- Full layout ----- -layout = [[sg.VPush()], +layout = [ + [sg.Menu(menu_def)], + [sg.VPush()], [ sg.Push(), sg.Column(panel_view_column, vertical_alignment="center", justification="center"), @@ -30,9 +35,13 @@ layout = [[sg.VPush()], window = sg.Window("Lora 回传显示模块", layout, resizable=True, size=(500, 300), finalize=True) # Run the Event Loop +i = 1 while True: event, values = window.read() if event == "Exit" or event == sg.WIN_CLOSED: break + window['-CHARACTER-'].update(i) + print(i) + window.close()