1 2 3 4 5 6 7 8 9 10 11 12 13
slint::include_modules!(); fn main() -> Result<(), slint::PlatformError> { let ui = AppWindow::new()?; let ui_handle = ui.as_weak(); ui.on_request_increase_value(move || { let ui = ui_handle.unwrap(); ui.set_counter(ui.get_counter() + 1); }); ui.run() }