Skip to content

Instantly share code, notes, and snippets.

@tronical
Last active April 19, 2024 09:42
Show Gist options
  • Save tronical/c44a30b8b8f34b32aa6e26f567348b1a to your computer and use it in GitHub Desktop.
Save tronical/c44a30b8b8f34b32aa6e26f567348b1a to your computer and use it in GitHub Desktop.
Simple Slint Example
import { Button, VerticalBox } from "std-widgets.slint";
export component AppWindow inherits Window {
in-out property<int> counter: 42;
callback request-increase-value();
VerticalBox {
Text {
text: "Counter: \{root.counter}";
}
Button {
text: "Increase value";
clicked => {
root.request-increase-value();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment