[Development] QtQml value types

Jędrzej Nowacki jedrzej.nowacki at digia.com
Fri Apr 25 17:34:57 CEST 2014


On Friday 25 of April 2014 13:03:33 Richard Moore wrote:
> 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.

Hi,

  This one was elegant but a bit too heavy from performance point of view, 
mostly because it was not possible to cache any data or assume data layout. As 
soon you had qscriptclass in the scope your code was not optimal anymore.

Cheers,
  Jędrek



More information about the Development mailing list