Replies: 1 comment
-
I found a solution. The inner let regs: Rc<VecModel<ModelRc<SharedString>>> = Rc::new(VecModel::from(vec![]));
let regs_model = ModelRc::from(regs); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reading #4632 and the old documentation, I see it's possible to create a 1d vector like
VecModel<SharedString>
that then gets interpretes as a[string]
by the slint language. However, I can't figure out how to create a 2d vector model of typeVecModel<VecModel<SharedString>>
(or some type like that). Such a model shall be interpreted by the slint language as a[[string]]
, to then be used in a for loop to create multiple widgets that each require a[string]
input property.The following attempt produces the error below
rustc: the trait bound `slint::VecModel<slint::SharedString>: std::clone::Clone` is not satisfied
What am I doing wrong? Has anyone been able to create a 2d vector model? Is there a better approach?
Beta Was this translation helpful? Give feedback.
All reactions