Error: Failed to run custom build command #2971
-
I am currently checking out slint and tried to write a simple lights-out game. The slint GUI code seems to be fine, because the "Show Preview" inline button in vscode opens the window as expected and it also works in SlintPad. The build.rs was automatically generated by the cargo-generate command and the slint project template. Its contents are: fn main() {
slint_build::compile("ui/appwindow.slint").unwrap();
} The complete error message with RUST_BACKTRACE=1 is as follows: Error Message
Any help would be appreciated. Edit: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I think the problem here is this line:
The percent type is an internal type that wasn't really meant to be used as a property. We probably should either have a warning, or somehow a better error when converting to rust. Or maybe just support this type. |
Beta Was this translation helpful? Give feedback.
-
I managed to trace the error back to the for loop:
Changing the expression |
Beta Was this translation helpful? Give feedback.
I managed to trace the error back to the for loop:
Changing the expression
(size*size)
to a precomputed propertyprivate property <int> N: size*size;
does not panic and works as expected.