1786032381

This commit is contained in:
2026-08-06 18:06:21 +02:00
parent d9816ec119
commit a79b35dff2
2 changed files with 63 additions and 6 deletions

View File

@@ -17,12 +17,15 @@ fn main() -> Result<(), slint::PlatformError> {
let main_window = MainWindow::new()?;
let weak_window = main_window.as_weak();
thread::spawn(move || {
slint::spawn_local(async move {
sleep(Duration::from_secs(3));
weak_window.upgrade_in_event_loop(move |ui| {
if let Some(strong) = weak_window.upgrade() {
println!("Goodbye!");
ui.set_text("GoodBye!".into());
})
strong.set_text("Goodbye!".into());
};
// weak_window.upgrade_in_event_loop(move |ui| {
// ui.set_text("GoodBye!".into());
// })
});
main_window.run()