mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 21:34:50 +00:00
Add another way to load .60 files from a build script
This commit is contained in:
parent
0553ab8b1a
commit
9fc60e104f
10 changed files with 219 additions and 2 deletions
16
examples/rusttest2/src/main.rs
Normal file
16
examples/rusttest2/src/main.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
sixtyfps::include_modules!();
|
||||
|
||||
fn main() {
|
||||
let mut app = Hello::default();
|
||||
|
||||
app.plus_clicked.set_handler(|context, ()| {
|
||||
let app = context.component.downcast::<Hello>().unwrap();
|
||||
app.counter.set(app.counter.get(context) + 1);
|
||||
});
|
||||
app.minus_clicked.set_handler(|context, ()| {
|
||||
let app = context.component.downcast::<Hello>().unwrap();
|
||||
app.counter.set(app.counter.get(context) - 1);
|
||||
});
|
||||
|
||||
app.run();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue