For C++ models, Qt uses .count. For JS models, it uses .length. When you find 
yourself in the unenviable position of having to provide a C++ model where a JS 
one would have sufficed, it's painful to have to change all the model.length-s 
to model.count-s.

That's the "easy part".

But the real magic would be if we could also eliminate the setProperty(index, 
property, value) pain. The desire is to 
be able to use:
modelItems[i].property = 7

directly, instead of:
modelItems.setProperty(i, "property", 7)

The rest of JS land is moving to observables. It would be nice when setting a 
JS object to a model that transparently wraps it in some kind of QObservable 
that would take care of translating direct accesses to the proper model updates.


Also, in a similar vein, support for:
- for (var i of x) (ES2015)



_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to