Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.0.0
-
None
-
Mac OSX 10.7.5
-
-
d2737bdedb6a53f83bab1c1c5606bcfc1df91687
Description
The attached test project shows the difference between a QML var property used as a Javascript array:
property var qmlList: []
and a QVariantList used as a Javascript array:
Q_PROPERTY(QVariantList list READ list WRITE setList NOTIFY listChanged)
The QML declared list works as expected as a JS array. However, the C++ QVariantList accepts JS array operations (such as push, splice, etc) yet they have no effect.
I feel this may be related to #QTBUG-28602.
I noticed that QList properties works with int, bool, etc, so I added support for QVariantList in qv8sequencewrapper. I would have linked to a patch on gerrit, but I was having trouble pushing it successfully. For now, I've attached the patch, I'll have another look at gerrit stuff tomorrow.
Attachments
Issue Links
- relates to
-
QTBUG-31723 QObjectList is not understood by QML2
- Closed
-
QTBUG-42277 urllist type is not exposed (even to QML)
- Open
- resulted in
-
QTBUG-108451 [6.2.4 -> 6.4.0] QML: QVariantList is not automatically converted to array
- Closed