mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
29 lines
516 B
Text
29 lines
516 B
Text
|
|
SubElements := Rectangle {
|
|
signal foobar;
|
|
|
|
TouchArea {
|
|
clicked => { foobar() }
|
|
}
|
|
|
|
TouchArea {
|
|
clicked: 45;
|
|
// ^error{'clicked' is a signal. Use `=>` to connect}
|
|
x => {}
|
|
// ^error{'x' is not a signal in TouchArea}
|
|
}
|
|
|
|
TouchArea {
|
|
clicked => { foobar() }
|
|
clicked => { foobar() }
|
|
// ^error{Duplicated signal}
|
|
}
|
|
|
|
does_not_exist => {
|
|
// ^error{'does_not_exist' is not a signal in Rectangle}
|
|
root.does_not_exist();
|
|
}
|
|
|
|
|
|
}
|
|
|