[Qt-qml] QObjectListModel loading time
Andre Somers
andre at familiesomers.nl
Sun Nov 13 10:05:58 CET 2011
Op 13-11-2011 7:29, Pris Matic schreef:
> Hiya,
>
> I've been using this class:
> https://qt.gitorious.org/qt-labs/qml-object-model to expose a list of
> QObject properties to a ListView. It works great until the number of
> objects in the ListView starts going up. I have about 70 objects in my
> list view, each with maybe 10 properties (all QStrings or ints). My
> delegate isn't complicated, and ListView performance (ie. scrolling)
> is fluid. The issue is it takes forever for the ListView to load in
> the first place... upwards of 6-7 seconds on my dual core PC. This
> doesn't occur if you expose the data to the ListView through
> QVariant... in that case the data shows up almost immediately. Once
> the data is loaded, everything runs great. It also loads fine when
> there are less than 10-15 items. Has anyone else experienced this when
> using a Qaim based model with ListView in QML? Are there any workarounds?
>
How do you add the QObjects to the QObjectListModel? Do you do that
object-by-object, or do you set the whole list in one go using a
QObjectList?
André
More information about the Qt-qml
mailing list