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

Cannot pass enum value as signal parameter from C++ to QML

XMLWordPrintable

    • f2219ce983098fc14655d8f3bb8a7fee2c9abe4d

      See attached file.

      When an ImageViewer::Status value is emitted from C++, it is received in the QML signal as a QVariant(ImageViewer::Status) value, instead of the actual enum value.

      The enum has already been registered using:

      • Q_ENUMS
      • Q_DECLARE_METATYPE (as ImageViewer::Status)
      • qRegisterMetaType (as ImageViewer::Status)

        1. enumsInSignalsAlt.diff
          0.8 kB
        2. enumsInSignals.diff
          2 kB
        3. enums.tar.gz
          0.8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            bealam Bea Lam (closed Nokia identity) (Inactive)
            bealam Bea Lam (closed Nokia identity) (Inactive)
            Votes:
            12 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes