-
Hi ! I need a way to generate several letters in a for loop, in a slint file. In particular, I need to insert the letters A to H in my slint component, with a for loop. But I don't know how to encode the loop index into a letter. In fact, I would like to access string methods like charCodeAt() or String.fromCharCode() that exists in Javascript. Is it possible ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The slint language is not a programming language, and it is kept that way so that the logic and UI is kept separate. So you can fill a model from the native code. Or you can do so with callbacks. (Example: the to-upper-case callback in https://docs.rs/slint/latest/slint/docs/recipes/index.html#global-callbacks ) Or you can just do
|
Beta Was this translation helpful? Give feedback.
The slint language is not a programming language, and it is kept that way so that the logic and UI is kept separate.
So you can fill a model from the native code.
Or you can do so with callbacks. (Example: the to-upper-case callback in https://docs.rs/slint/latest/slint/docs/recipes/index.html#global-callbacks )
Or you can just do