Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Much needed example of how to define and use signals and slots using custom Rust types #15

Open
vdods opened this issue Mar 15, 2021 · 0 comments

Comments

@vdods
Copy link

vdods commented Mar 15, 2021

The qt_* libraries work great! The only conspicuously missing thing is an obvious way (preferably demonstrated through a working example) of defining signals and slots that use custom Rust types (not the built-in ones with hard-coded names like SlotNoArgs, SlotOfQModelIndexIntInt, etc). I spent a while looking at the implementations of the built-in slot types, and briefly started to modify a copy/pasted version of one to make my own (for e.g. struct RustData { x : usize, y : String }), but eventually realized that there are apparently hardcoded FFI functions for each slot type as well, and decided not to go down that rabbit hole.

Is there an obvious way to do this that I'm missing?

Either way, an example of this would be much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant