examples icon indicating copy to clipboard operation
examples copied to clipboard

encouraging...

Open jlgerber opened this issue 5 years ago • 3 comments
trafficstars

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

jlgerber avatar Dec 17 '19 08:12 jlgerber

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 https://github.com/rust-qt/ritual/issues/26. I just don't have enough time to implement it right now, but hopefully I'll do it eventually.

Riateche avatar Dec 18 '19 17:12 Riateche

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.

jlgerber avatar Dec 20 '19 07:12 jlgerber

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

patrickelectric avatar Mar 24 '20 02:03 patrickelectric