[Development] QtQml value types

Richard Moore rich at kde.org
Fri Apr 25 14:03:33 CEST 2014


On 25 April 2014 11:51, Alberto Mardegan <mardy at users.sourceforge.net>wrote:

> For instance, I would like to have a GeoPoint type with "latitude" and
> "longitude" properties; if I exposed it as a QVariantMap, I wouldn't be
> able to prevent the QML code from doing stuff like:
> p.latitude = 60
> p.longitde = 10 // note the typo
>

An approach like http://qt-project.org/doc/qt-4.8/qscriptclass.html would
allow this to be enforced.

Rich.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140425/f23718df/attachment.html>


More information about the Development mailing list