Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
5.12, 5.13, 5.14, 5.15, 6.0.0 Beta2, 6.0, 6.1
-
121b8a6ae42d9423250ab1121c15c49ab064307a
Description
An enum defined in class A and used as a property works fine inside a binding and a javascript function
Using the same enum from class A in a new class B also works fine inside a binding and a javascript function.
Deriving class C from class B and using the Q_OBJECT macro, Makes the enum work inside the binding, but using the same enum inside a javascript function doesn't.
Attached an example which instantiates all 3 classes and using a binding to set the enum.
3 Buttons are defined which use a Javascript function to update the enum properties. Using the "Change Object C" button, results in no change of the property but shows the following warning:
qrc:/main.qml:45: Error: Cannot assign [undefined] to int
None of this should actually work. We need to output a warning when we detect it and deprecate this behavior.