-
Notifications
You must be signed in to change notification settings - Fork 80
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
Bridge module without QObject type #1033
Comments
When I've tried to reproduce this locally, I got this error message:
Is this similar to what you found? |
@BenFordTytherington Sorry for the late response - I accidentally turned off notifications. Yes, that's exactly the error I got. |
Hm, that actually seems like it's not moc that's the issue, but rather qmltyperegistrar. Although the two are somewhat related, that's not the same thing. This then fails, as we seem to pass it the wrong data. Probably because it's trying to register a type from a file that doesn' have one. You may be able to get around this by defining the bridge not in a QML module, but just as a normal bridge in the CxxQtBuilder. But we should of course fix this for QML modules as well. |
Discussed in #1032
Originally posted by SanderVocke August 13, 2024
Hi there,
I'm finding that cxx-qt does not seem to allow defining a bridge module that does not have a
#[qobject]
-type in it. The reason seems to be that automoc is run on the resulting C++ files, and they error out when there are no Q_OBJECT types in the headers. For this reason, I am having to add dummy QObject types to all the bridge modules that I am making with e.g. some trivial types in them.Am I missing something?
Example:
This works, but fails as soon as the
Dummy
andDummyRust
types are removed.The text was updated successfully, but these errors were encountered: