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

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

    XMLWordPrintable

Details

    • f2219ce983098fc14655d8f3bb8a7fee2c9abe4d

    Description

      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)

      Attachments

        1. enums.tar.gz
          0.8 kB
        2. enumsInSignals.diff
          2 kB
        3. enumsInSignalsAlt.diff
          0.8 kB

        Issue Links

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

          Activity

            People

              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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes