You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we could replicate the SLOT and SIGNAL macros, it would be possible to expose this function ourselves.
Luckily, this doesn't seem hard to do, the Qt sources show that these macros just end up pre-pending "1" and "2" to the signature (and call qFlagLocation in DEBUG).
We could provide our own macros that add these prefixes, and also translate the signature from C++ to Rust, so that:
As mentioned in #1198 , it would be good if we could connect directly between signals and slots of QObjects.
The new Qt API for QObject::connect has the issue that it is heavily templated, which doesn't lend itself well to a general solution in CXX.
However, the older QObject APIs that take
const char*
still exist: https://doc.qt.io/qt-6/qobject.html#connect-1If we could replicate the
SLOT
andSIGNAL
macros, it would be possible to expose this function ourselves.Luckily, this doesn't seem hard to do, the Qt sources show that these macros just end up pre-pending
"1"
and"2"
to the signature (and call qFlagLocation in DEBUG).We could provide our own macros that add these prefixes, and also translate the signature from C++ to Rust, so that:
would become:
Note that the macro should probably return NewType wrappers around
&'static str
so that we add a bit more type safety.The text was updated successfully, but these errors were encountered: