lzghades
2023-02-25 15:00:26 +08:00
import PySimpleGUI as sg
# Create a window
layout = [ [sg.Text('Press Me')],
[sg.Button('Press Me')] ]
window = sg.Window('My Window', layout)
# Event Loop to process "events" and get the "values" of the inputs
while True:
event, values = window.read()
if event in (None, 'Exit'): # if user closes window or clicks cancel
break
elif event == 'Press Me':
sg.popup('Hello!')
window.close()
这个是我的回复。。。你怕是调了个假接口。。