This is an Slint official example. When no-frame is set to true, the click event will not work. However, when it is set to false, the click event functions correctly #6753
-
This is an official example. When no-frame is set to true, the click event will not work. However, when it is set to false, the click event functions correctly import { Button } from "std-widgets.slint";
export component App inherits Window {
no-frame: true; //here
preferred-height: 200px;
in-out property <int> active-tab;
VerticalLayout {
tab_bar := HorizontalLayout {
spacing: 3px;
Button {
text: "Red";
clicked => { root.active-tab = 0; }
}
Button {
text: "Blue";
clicked => { root.active-tab = 1; }
}
Button {
text: "Green";
clicked => { root.active-tab = 2; }
}
}
Rectangle {
clip: true;
Rectangle {
background: red;
x: root.active-tab == 0 ? 0 : root.active-tab < 0 ? - self.width - 1px : parent.width + 1px;
animate x { duration: 125ms; easing: ease; }
}
Rectangle {
background: blue;
x: root.active-tab == 1 ? 0 : root.active-tab < 1 ? - self.width - 1px : parent.width + 1px;
animate x { duration: 125ms; easing: ease; }
}
Rectangle {
background: green;
x: root.active-tab == 2 ? 0 : root.active-tab < 2 ? - self.width - 1px : parent.width + 1px;
animate x { duration: 125ms; easing: ease; }
}
}
}
}
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
The button click event is not working. |
Beta Was this translation helpful? Give feedback.
-
This looks like issue #5863. We are stuck on that one apparently :-( |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this is or is not related to #5863. I managed to get my MS build tools fixed and tried again. The project I created from your sample code works perfectly on my end, so I haven't been able to reproduce this. Do you have any environment variables set, are you making any changes to the Slint backend? Could you create a whole sample project with the issue and post it on github? |
Beta Was this translation helpful? Give feedback.
I'm not sure if this is or is not related to #5863. I managed to get my MS build tools fixed and tried again. The project I created from your sample code works perfectly on my end, so I haven't been able to reproduce this. Do you have any environment variables set, are you making any changes to the Slint backend? Could you create a whole sample project with the issue and post it on github?