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

encouraging... #3

Open
jlgerber opened this issue Dec 17, 2019 · 3 comments
Open

encouraging... #3

jlgerber opened this issue Dec 17, 2019 · 3 comments

Comments

@jlgerber
Copy link

Just want to thank you again for this amazing work. I was able to throw together a pretty substantial prototype in a very short amount of time.
I really feel like this is the best library hands down to write UIs in Rust.
As an aside, I am wondering if we can use the qmetaobject to get around limitations with the lack of inheritance in rust? Do you have plans for tackling this?
image

@Riateche
Copy link
Member

Thank you!

I don't know how to emulate subclasses with QMetaObject. As far as I know, it only manages signals, slots, properties, and invokable methods, so it doesn't even know about most virtual methods. And there are many classes in Qt that can be usefully subclassed but do not have a QMetaObject.

Supporting inheritance properly is definitely possible. See an old draft at rust-qt/ritual#26. I just don't have enough time to implement it right now, but hopefully I'll do it eventually.

@jlgerber
Copy link
Author

I suppose that handling signals, slots, properties form a part of what one reaches for subclasses for in qt in c++. Certainly this doesn't cover everything, but i would imagine that one can get really far with composition + custom signals/slots/properties. Sure, no overriding virtual methods, etc. but still quite useful.

@patrickelectric
Copy link

Hey guys, any tip of how to register component to be accessible under qml ?
qmlRegisterSingletonType and friends.

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

3 participants