Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-59083

Indicate that a function is Q_INVOKABLE in the documentation

    XMLWordPrintable

Details

    • 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().

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            gbk Martin Smith (Qt)
            grecko Pierre-Yves Siret
            Votes:
            8 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes