Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15, 6.2
-
bf115a446c1a633a11577306eff8a78028a7f5b5
Description
QQmlComponent::createWithInitialProperties and setInitialProperties take a QVariantMap of properties and don't 'unbox' QVariant(QJSValue), so it's impossible to set JS types as initial properties.
This makes some types with required properties impossible to (correctly) create from the C++ API. It also means Qt.binding() can't be used like it can with Component.createObject() or Loader.setSource(). See the attached testcase.
Attachments
For Gerrit Dashboard: QTBUG-101440 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
416186,4 | Show QJSValue::toMap() is a valid input for createWithInitialProperties | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |