On Mon, May 30, 2011 at 6:15 PM, Andrew Flegg <and...@bleb.org> wrote:

> BTW, list handling in QML is a pain. I suspect this list
> recreation/parsing/manipulation is accounting for a large portion of
> the CPU usage. Other thoughts from Qt Quick experts appreciated; but

Have you considered using plain javascript Arrays, instead of QML
lists? I find them better, mainly because I dislike the undocumented
and quirky behavior of most QML specific data types (immutable
QVariantMap's etc). They would probably be faster than what you are
currently doing as well.

There is no way to store javascript objects in QML components yet
(yes, I frequently complain about this in various places), but you can
accomplish the same by using this "priv" hack:

http://projects.forum.nokia.com/catbowling/browser/qml/catbowling/priv.js

http://projects.forum.nokia.com/catbowling/browser/qml/catbowling/GameScene.qml

Check out how the list "enemies" is handled in GameScene.qml
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to