Cannot pass enum value as signal parameter from C++ to QML
-
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
-
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?