sync
This commit is contained in:
parent
bf4cd8d028
commit
23f86a3c65
|
@ -2,10 +2,13 @@
|
||||||
|
|
||||||
import PySimpleGUI as sg
|
import PySimpleGUI as sg
|
||||||
import os.path
|
import os.path
|
||||||
|
import time
|
||||||
|
|
||||||
# First the window layout in 2 columns
|
# First the window layout in 2 columns
|
||||||
sg.theme('DarkAmber') # Add a touch of color
|
sg.theme('DarkAmber') # Add a touch of color
|
||||||
|
|
||||||
|
menu_def = [['Panel'], ['Debug']]
|
||||||
|
|
||||||
panel_view_column = [
|
panel_view_column = [
|
||||||
[
|
[
|
||||||
sg.Text("字符识别结果:", font=("微软雅黑", 20), size=(23, 1))
|
sg.Text("字符识别结果:", font=("微软雅黑", 20), size=(23, 1))
|
||||||
|
@ -18,7 +21,9 @@ panel_view_column = [
|
||||||
|
|
||||||
|
|
||||||
# ----- Full layout -----
|
# ----- Full layout -----
|
||||||
layout = [[sg.VPush()],
|
layout = [
|
||||||
|
[sg.Menu(menu_def)],
|
||||||
|
[sg.VPush()],
|
||||||
[
|
[
|
||||||
sg.Push(),
|
sg.Push(),
|
||||||
sg.Column(panel_view_column, vertical_alignment="center", justification="center"),
|
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)
|
window = sg.Window("Lora 回传显示模块", layout, resizable=True, size=(500, 300), finalize=True)
|
||||||
|
|
||||||
# Run the Event Loop
|
# Run the Event Loop
|
||||||
|
i = 1
|
||||||
while True:
|
while True:
|
||||||
event, values = window.read()
|
event, values = window.read()
|
||||||
if event == "Exit" or event == sg.WIN_CLOSED:
|
if event == "Exit" or event == sg.WIN_CLOSED:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
window['-CHARACTER-'].update(i)
|
||||||
|
print(i)
|
||||||
|
|
||||||
window.close()
|
window.close()
|
||||||
|
|
Loading…
Reference in New Issue