aboutsummaryrefslogtreecommitdiff
path: root/resource-viewer/src/main.rs
blob: 4fa6b9f9ced08199ca2eb97add1d0b223efd8ca7 (plain) (blame)
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()
}