1786043104
This commit is contained in:
@@ -15,8 +15,10 @@ fn main() -> Result<(), slint::PlatformError> {
|
||||
|
||||
let weak_window = main_window.as_weak();
|
||||
slint::spawn_local(async move {
|
||||
sleep(Duration::from_secs(5));
|
||||
weak_window.upgrade_in_event_loop(move |ui| {
|
||||
println!("Hello!");
|
||||
ui.set_text("Hello!".into());
|
||||
sleep(Duration::from_secs(5));
|
||||
println!("Goodbye!");
|
||||
ui.set_text("GoodBye!".into());
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user