Open Supreeeme opened 1 year ago
There is the current doc for that: https://github.com/woboq/qmetaobject-rs#what-if-a-wrapper-for-the-qt-c-api-is-missing And you can look at the source code of the crate for examples.
The example in the docs seems to show creating a new QObject from Rust, but I want to use one that already exists from C++. I see the QObjects that come with the library are wrapped withcpp_class!
, but none of them implement the QObject trait. Is it possible to get an implementation of this trait for something wrapped with cpp_class!
?
The guidance in the README seems to be around creating your own QObjects from Rust. But is there any way to wrap a QObject in Qt's library that isn't currently in qmetaobject? Namely, I'm interested in being able to connect to their signals/slots, and as far as I'm aware
cpp_class!
does not provide this.