-
I have a 2d array property where I define a callback on change on it:
I struggle to access the elements in the callback definition:
The callback has more than this single array parameter, but I skipped the others for simplicity. |
Beta Was this translation helpful? Give feedback.
Answered by
ogoffart
May 5, 2025
Replies: 2 comments 1 reply
-
I think you can do something like so: if let slint_interpreter::Value::Model(model) = &args[0] {
... here you can access model.row_count() and model.row_data()...
} Note that the model.row_data would as well be a Value::Model |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks for your help. Both methods work:
or
|
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
There is also a
impl TryFrom<ModelRc<Value>> for Value