slint
slint copied to clipboard
Bug - Slint Server Crashed when trying to call function from States
Thanks Devs for your work!
I'm using Slint on Linux with the Visual Studio extension. It obvious that the error is root.animate: 30px;
. I just need to restart the editor for the Slint extension to work again. On another note... is there a way to call a function from states?
Here is the code that creates the issue:
component Ball inherits HorizontalLayout{
in property <bool> replaceAll: false;
property <bool> replaceable: true;
in property <string> name:"";
spacing: 10px;
height: 30px;
animate height { duration: 300ms; easing: linear; delay: 200ms;}
function animate() {
root.height = 0px;
}
states [
replaced when replaceable && replaceAll: {
root.height: 50px;
root.animate: 30px;
}
]
}