Ошибка:
Описание ошибки
Это переводится на английский: «Flet перестает работать и т. д.».
Я работаю в Windows 10, Python 3.12 и Flet 0.24.1
Не рабочий код:
Код: Выделить всё
def on_close_event(e):
if e.data == "close":
un_tasks = dict()
i = 0
for tt in tab_download.tasks.controls:
if type(tt.value) == str:
un_tasks[i] = {"ttask": tt.ttask, "value": {"name": "", "path": ""}}
else:
un_tasks[i] = {"ttask": tt.ttask, "value": {"name": tt.value.name, "path": tt.value.path}}
i += 1
write_unfinished_tasks(un_tasks)
page.window.destroy()
page.window.prevent_close = True
page.window.on_event = lambda x: on_close_event(x)
Подробнее здесь: https://stackoverflow.com/questions/790 ... vent-event
Мобильная версия