Closed SanderVocke closed 2 months ago
I think you may have a typo it should be #[qinvokable]
not #[qinvokeable]
, but we also should improve the errors so that unknown attributes error (can't remember if we have a bug already for this but it has been discussed between us at some point that that is what we should do).
Whoops, of course! Thank you and closing.
See the following code. It is a bit long, but the essential part is only:
QMap_QString_QVariant
fromcxx-qt-lib
;I am guessing this is not working because this type is not registered as a metatype. I am continuing to debug it.
But what I regard as a bug regardless of the root cause here, is that the generated code does not put Q_INVOKEABLE on the method in the generated class, even though I marked it as such in the bridge definition. I think that whatever the cause is, this should at least generate an error in the qinvokeable macro but not fail silently.
On a side note,
cxx-qt-lib
providesQMap_QString_QVariant
andQVariant
, but not the construction of the latter from the former or interpretation of the latter as the former. Maybe those conversions should be added.