Description
Description
I am encountering an issue when trying to implement the code documented in the Flet.dev documentation regarding controlling window visibility (referencing the section at https://flet.dev/docs/controls/page/#window_visible). Specifically, I'm experimenting with the view=ft.AppView.FLET_APP_HIDDEN
option to hide the application window as described.
However, it appears that this feature is not functioning as expected in recent versions of the Flet library (including but not limited to version 0.20.2). Upon applying FLET_APP_HIDDEN
, the window does not get hidden as documented.
Code example to reproduce the issue:
from time import sleep
import flet as ft
def main(page: ft.Page):
print("Starting the process...")
page.add(
ft.Text("Hello!")
)
sleep(3)
print("Waking up from sleep...")
page.window_visible = True
page.update()
ft.app(target=main, view=ft.AppView.FLET_APP_HIDDEN)
Describe the results you received:
The window appears immediately upon program execution and does not get hidden during that period.
Describe the results you expected:
The program starts with a hidden window and makes it visible in 3 seconds.
Additional information you deem important (e.g. issue happens only occasionally):
This feature functions as intended on another computer running Flet version 0.10.
Flet version (pip show flet
):
flet 0.20.2
Operating system:
Windows 11 22H2
Please let me know if you need any more details or have suggestions for further troubleshooting steps. Thank you!
Metadata
Metadata
Assignees
Type
Projects
Status