Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
4.7.0
-
None
-
Tested on Maemo 6 i486 target
Description
I have declared an enum in a class and use it as an argument in a signal. I can use the enum in QML, but I cannot read the parameter in the signal handler. Example:
class MyObject {
Q_OBJECT
Q_ENUMS(MyEnum)
Q_PROPERTY(MyEnum value READ value NOTIFY valueChanged)
public:
enum MyEnum
;
signals:
void valueChanged(MyEnum value);
}
Qml file
----------
MyObject {
onValueChanged: console.debug("Value is " + value)
}
This fails with the following output:
QMetaProperty::read: Unable to handle unregistered datatype 'MyEnum' for property 'QDeclarativeBoundSignalParameters::value'
Attachments
Issue Links
- is replaced by
-
QTBUG-15983 Cannot pass enum value as signal parameter from C++ to QML
- Closed