qmlweb-parser icon indicating copy to clipboard operation
qmlweb-parser copied to clipboard

Error parsing property with literal object value

Open GTylissanakis opened this issue 9 years ago • 1 comments

my qml contains the following code:

property var map: {"A": "test", "B": "test"}

and I get the following error:

Unexpected token: punc (:) (line: 22, col: 25, pos: 665)
>>22  property var map: {"A": "test", "B": "test"}

GTylissanakis avatar Nov 01 '16 15:11 GTylissanakis

Yes, I can confirm this.

It seems that objects with quoted property names should be treated as plain js objects, i.e. as wrapped in { return ... }. That doesn't work for objects with unquoted property names that way in Qt, though.

ChALkeR avatar Nov 12 '16 22:11 ChALkeR