Skip to content

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

Description

@vdods

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions