flet icon indicating copy to clipboard operation
flet copied to clipboard

page.window_visible not working correctly on MacOS

Open maxronk opened this issue 2 years ago • 2 comments

I'm trying to make a window that becomes invisible for 1 sec when I click a button and then turns visible again. The code is super simple and it works perfectly on a Windows PC. But on MacOS it somehow doesn't work. The window disappears and doesn't show up again.

import flet as ft
import time

def main(page: ft.Page):

    def btn_click(e):
        page.window_visible = False
        page.update() 
        time.sleep(1)

        page.window_visible = True
        page.update()

    page.add(
            ft.ElevatedButton("Say hello!", on_click=btn_click),
        )

ft.app(target=main)

Flet version: 0.8.2 MacOS 13.4.1

maxronk avatar Jul 21 '23 17:07 maxronk

Same here:

The example from the docs --> https://flet.dev/docs/controls/page/#window_visible Didnt work on macOS .. the app window never gets visible.

MacOS: Sonoma

NiTRoeSE avatar Oct 08 '23 19:10 NiTRoeSE

Can you please try the latest pre-release and let know if the issue still happens? (code example)

ndonkoHenri avatar Dec 08 '25 02:12 ndonkoHenri