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

Q_ENUMs from one class cannot be used as a Q_INVOKABLE function parameter of another class when being in a namespace

    XMLWordPrintable

Details

    • All

    Description

      This is a clone of QTBUG-58454, which is closed but is still broken in Qt 5.13 - at least in the special case where the class is inside a namespace.

      When declaring in the same class one enumeration, the corresponding Q_ENUM's, and a Q_INVOKABLE function with the enumeration in parameter, the function can be called from qml.
      But if the enumeration comes from another class, the Q_INVOKABLE function cannot be called with the following error message:
      "Error: Unknown method parameter type"

      Accessing the Enum value outside the method call does work.

      Attachments

        Issue Links

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              cajus Cajus Pollmeier
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: