Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

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

    QML and Qt Quick
    2
    2
    2907
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vishwajeet last edited by

      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)

      If you have faced same issue then please vote to raise priority of this issue in http://bugreports.qt.nokia.com/browse/QTBUG-15983

      Born To Code !!!

      1 Reply Last reply Reply Quote 0
      • M
        mario last edited by

        I have no idea if this works, but have you checked the "QDeclarativeEngine":http://doc.qt.nokia.com/4.7/qdeclarativeengine.html docs, especially "QML_DECLARE_TYPE":http://doc.qt.nokia.com/4.7/qdeclarativeengine.html#QML_DECLARE_TYPE

        Can that be to any help?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post