This commit is contained in:
raiots 2023-06-02 21:01:18 +08:00
parent bf4cd8d028
commit 23f86a3c65
1 changed files with 10 additions and 1 deletions

View File

@ -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()