Experiments with slint

This commit is contained in:
Margret Riegert
2026-02-22 23:23:49 -05:00
parent e71ddcb726
commit f7af29eb75
4 changed files with 72 additions and 18 deletions

View File

@@ -8,13 +8,13 @@ slint::include_modules!();
fn main() -> Result<(), Box<dyn Error>> {
let ui = AppWindow::new()?;
ui.on_request_increase_value({
let ui_handle = ui.as_weak();
move || {
let ui = ui_handle.unwrap();
ui.set_counter(ui.get_counter() + 1);
}
});
// ui.on_request_increase_value({
// let ui_handle = ui.as_weak();
// move || {
// let ui = ui_handle.unwrap();
// ui.set_counter(ui.get_counter() + 1);
// }
// });
ui.run()?;