slint
slint copied to clipboard
unable to convert Vec<String> into mismatched types expected struct `ModelRc<slint::SharedString>` found struct `Vec<String>`rustcClick for full compiler diagnostic
slint=1.4.1 unable to convert Vec<String> into ModelRcslint::SharedString
export component AppWindow inherits Window {
width: 480px;
height: 320px;
in-out property<int> counter: 42;
in-out property <[string]> ports;
callback request-increase-value();
VerticalBox {
HorizontalBox {
ComboBox {
// model: ["com1", "com2"];
model: ports;
}
Button {
text: "open";
}
}
Text {
text: "Counter: \{root.counter}";
}
Button {
text: "Increase value";
clicked => {
root.request-increase-value();
}
}
}
}
how can i set ports in rust code? where in rust code i am having value in Vec<String>? unable to find any solution?
Somebody just asked recently the same question in this discussion: https://github.com/slint-ui/slint/discussions/4632
So I'm closing this as a duplicate
Note: for questions, please use the discussions: https://github.com/slint-ui/slint/discussions issues are meant for bug reports.