[Qt-qml] Cannot store javascript object in property, why?

Ville M. Vainio vivainio at gmail.com
Tue Dec 21 15:39:21 CET 2010


On Tue, Dec 21, 2010 at 3:32 PM,  <jyrki.yli-nokari at nokia.com> wrote:

> Personally I vote for a simple low-overhead solution that enables one to
> mark the desired objects (and arrays) bindable. It does not have to be

I guess you mean "unbindable", with "bindable" being the default.

How about the ability to mark a property "private" - e.g.

private property JSObj a

Or just

private JSObj a

This would signal that

- Property is not visible outside the .qml file
- Property does not notify about changes to it. This could be used to
speed up manipulation of more primitive objects as well (int,
string...)

If we don't get a "direct" syntax for this, I can envision using hacks like

QtObject {
 id: root

...

  setPriv(root, "myobj", obj)

...

  priv(root, "myobj").doStuff()

...
}

But, I'd much prefer direct syntactic support for such an elementary feature.

-- 
Ville M. Vainio @@ Forum Nokia


More information about the Qt-qml mailing list