1 | #![allow (deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/7guis"# ] |
2 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
3 | // SPDX-License-Identifier: MIT |
4 | |
5 | import { Button, LineEdit, HorizontalBox } from "std-widgets.slint" ; |
6 | |
7 | export component Counter inherits Window { |
8 | private property <int> value: 0; |
9 | |
10 | preferred-height: 30px; |
11 | |
12 | layout := HorizontalBox { |
13 | LineEdit { |
14 | enabled: false; |
15 | text: root.value; |
16 | } |
17 | |
18 | Button { |
19 | clicked => { root.value += 1; } |
20 | text: "Count" ; |
21 | } |
22 | } |
23 | } |
24 | } |
25 | |