Hi Olli, This sounds like a bug -- could you please create a report at bugreports.qt.nokia.com<http://bugreports.qt.nokia.com>?
Thanks, Michael On 02/11/2010, at 11:06 PM, ext [email protected]<mailto:[email protected]> wrote: Hi, 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. Is it supposed to work somehow? Example: class MyObject { Q_OBJECT Q_ENUMS(MyEnum) Q_PROPERTY(MyEnum value READ value NOTIFY valueChanged) public: enum MyEnum { Value1, Value2}; 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' I also tried to rename the signal parameter type to MyObject::MyEnum, but this did not work either. I can use the value correctly if I access it as a property, or if I assign enum values such as “property int myvalue: MyObject.Value1”. Thanks, Olli <ATT00001..txt>
_______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml
