[QBS] dictionary in qbs

Theo de Vries t.j.a.devries at gmail.com
Wed Jan 7 16:57:24 CET 2015


That resolved it, thanks for your quick reply.

Theo

2015-01-07 16:09 GMT+01:00 Bornemann Joerg <Joerg.Bornemann at theqtcompany.com
>:

> > I'd like to declare an object in my qbs file that is a collection of
> key-value pairs, i.e., a dictionary.
> > The documentation here: http://doc.qt.io/qbs/cpp-module.html states
> that this can be done for the infoPlist property of the cpp module as well.
> > I have tried several formats, e.g.:
> >
> > property var tst: { "key": 4, }
> >
> > and so on, but all I get is syntax errors. How do I declare a dictionary
> properly?
>
> The syntax to pass object literals to properties is:
>     property var tst: ({ "key": 4, })
>
> That's an idiosyncrasy of the QML parser.
>
>
> BR,
>
> Joerg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150107/cf666acc/attachment.html>


More information about the Qbs mailing list