enum/variant type in slint? #3080
-
Is it possible to map a rust enum to slint? I have an application like a 3d model viewer where every object can have any number of arbitrarily typed, named properties, and I want to show those (and make them editable) to the user. I don't see anything like a sum type in the slint docs, so I'm currently maintaining one model per type, then another model stores type info per property and indices into each of the type-specific models to get the actual data to display. This works, but with ~20 types to handle it's going to get extremely unwieldy to maintain. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Right now there is no such things in the slint language. There are some discussion in #1307 (comment) |
Beta Was this translation helpful? Give feedback.
Right now there is no such things in the slint language.
There are some discussion in #1307 (comment)