Second window from a button click on flet #4773
Unanswered
Samwellwang
asked this question in
Q&A
Replies: 2 comments
-
I'm having the same issue |
Beta Was this translation helpful? Give feedback.
0 replies
-
We are waiting on flutter/flutter#142845 for a proper way to have multi-windows. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to implement a function where a window has a button that opens another window after clicking it.
`import flet as ft
import threading
def open_second_window():
# 第二个窗口的应用逻辑
def second_window(page: ft.Page):
page.add(ft.Text("这是第二个窗口"))
def main(page: ft.Page):
def on_click(e):
# 使用线程启动第二个窗口
threading.Thread(target=open_second_window).start()
启动第一个窗口
ft.app(target=main)
`
but it doesn't work . shows:
ValueError: signal only works in main thread of the main interpreter
Beta Was this translation helpful? Give feedback.
All reactions