You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, there's a bit of a syntax conflict here. Using = in this case seems a bit out of place, but : clashes with the type specifier.
I wouldn't be against changing the struct field declaration to be more akin to property declaration, like @hunger suggested. It would make Slint's syntax more consistent overall, lowering the learning curve a bit.
It is often requested to have default values for struct fields
It could look like this:
Then, when initialized, or converted from a struct with less fields, the other fields are initialized with thei default value:
The Default implementation of the rust structure or C++ default constructor must initialize the fields accordingly.
The text was updated successfully, but these errors were encountered: