Skip to content
Discussion options

You must be logged in to vote

You can define struct in slint with

struct FooBar { boo: string, baa: int }

Then you can use this string in a property, or a callback, like so:

component Comp {
    in property <FooBar> some-property;
    callback do-something(FooBar);
}

You can also have property or callback on global.

That way you can access, from native code, to struct declared in Slint by adding a callback handler.

If you want to access structs written in native code for slint, this hasn't been implemented yet, but is planed in #1726

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by evan0greenup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants