-
With this slint file
I'm unable to set it from rust My code attempts -
|
Beta Was this translation helpful? Give feedback.
Answered by
ogoffart
Oct 19, 2023
Replies: 1 comment
-
you need to build a So something like (untested) let app = MainWindow::new().unwrap();//.run().unwrap();
let row_data: Rc<VecModel<ModelRc<SharedString>>> = Rc::new(VecModel::default());
// ^^^^^^^ changed to ModelRc
for r in 0..101 {
let items = VecModel::default();
for c in 0..3 {
items.push(slint::format!("Item {r}.{c}").into());
}
row_data.push(ModelRc::new(items));
}
app.set_empty_folder_model(row_data.into());
app.run().unwrap(); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
qarmin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you need to build a
VecModel<ModelRc<SharedString>>
So something like (untested)