feat: add search bar

This commit is contained in:
2026-04-29 18:09:03 +02:00
parent 3329938995
commit 3bfa31fcd2
4 changed files with 23 additions and 19 deletions
+18 -12
View File
@@ -1,22 +1,28 @@
import { Button, LineEdit, VerticalBox } from "std-widgets.slint";
export component AppWindow inherits Window {
in-out property <int> counter: 42;
callback request-increase-value();
// in-out property <int> counter: 42;
// callback request-increase-value();
width: 200px;
height: 60px;
in-out property <string> search-text: "";
callback request-text-input(string);
VerticalBox {
Text {
text: "Counter: \{root.counter}";
}
LineEdit {
placeholder-text: "Search for Software"
placeholder-text: "Search for Software";
accepted(text) => {
// debug("Accepted: ", text);
root.request-text-input(self.text);
}
}
Button {
text: "Increase value";
clicked => {
root.request-increase-value();
}
}
// Button {
// text: "Increase value";
// clicked => {
// root.request-increase-value();
// }
// }
}
}