Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.0
-
None
-
afbfdcff3b3cd14f16736b7c84e04fe9ad61ef8d
Description
If I expose a value type to QML using Q_GADGET, QVariant properties of the new type are not accessible from QML. Properties of other types work fine, and QVariant properties of QObject types work correctly.
I've attached a test case that demonstrates this.
This appears to be because QQmlValueTypeWrapper::get wraps the QVariant property value in a QVariant before passing it to QV4::ExecutionEngine::fromVariant, which doesn't handle this case. Indeed, the value of the property appears to be converted to a QV4::VariantObject in the engine.