application closure processing #5031
-
Good afternoon, can you tell me if you will implement application closure processing, or does it already exist? |
Beta Was this translation helpful? Give feedback.
Answered by
ndonkoHenri
Mar 6, 2025
Replies: 1 comment 3 replies
-
Is the below what you are looking for?
Example: import flet as ft
def main(page: ft.Page):
def click_action(e):
page.window_close()
but1 = ft.ElevatedButton(text="Exit", on_click=click_action)
page.add(but1)
page.update()
if __name__ == "__main__":
ft.app(target=main) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example: https://flet.dev/docs/reference/types/window#destroy