Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
5.9
-
None
-
fa50832e1ab62ba51af075cc31b07b51b47bfdd4
Description
There is no indication that a function is Q_INVOKABLE in the documentation.
When interacting with a c++ class in QML, we can access its properties, signals, slots and Q_INVOKABLE member functions but the latter are not documented as such so we are not aware of the possibility to call them.
The only way to know that a function is Q_INVOKABLE is to read the header of the class.
Classes that are made specifically for QML generally document those Q_INVOKABLE with a /qmlmethod documentation, but this is not the case for classes that have been around for a long time, before QML was created.
This can be useful even for non-QML code, to know which methods you can call with QMetaObject::invokeMethod().