mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 21:04:47 +00:00
Update syntax in Mini-C++ tutorial
This commit is contained in:
parent
7e02fa8b6a
commit
cbb5198bf6
1 changed files with 3 additions and 3 deletions
|
@ -138,12 +138,12 @@ Hopefully this should be self explanatory. Check out the documentation of the la
|
||||||
// file: my_application_ui.slint
|
// file: my_application_ui.slint
|
||||||
import { CheckBox, Button, ListView, LineEdit } from "std-widgets.slint";
|
import { CheckBox, Button, ListView, LineEdit } from "std-widgets.slint";
|
||||||
|
|
||||||
export struct TodoItem := {
|
export struct TodoItem {
|
||||||
title: string,
|
title: string,
|
||||||
checked: bool,
|
checked: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
export MainWindow := Window {
|
export component MainWindow {
|
||||||
callback todo_added(string);
|
callback todo_added(string);
|
||||||
property <[TodoItem]> todo_model;
|
property <[TodoItem]> todo_model;
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ export MainWindow := Window {
|
||||||
text: todo.title;
|
text: todo.title;
|
||||||
checked: todo.checked;
|
checked: todo.checked;
|
||||||
toggled => {
|
toggled => {
|
||||||
todo.checked = checked;
|
todo.checked = self.checked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue