Skip to content

page.on_close #4490

@nenocalmeida

Description

@nenocalmeida

My vscode is not capturing the on_close event in python
Flet version: 0.25.1
python version: 3.12.5
Operating system: Windows 10

import flet as ft

def main(page: ft.Page):
page.title = "Flet App"

page.add(ft.Text("Hello, World!"))

def window_event(e):
    if e.data == 'close':
        print('fechando a janela')

page.on_close = window_event    

page.update()

ft.app(main)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions