Non blocking QAbstractListModel/ListView/Repeater + BusyIndicator
-
Hello,
I had implemented a ListView, but changed it to a Flickable + Column + Repeater.
I'm working on a small ARM board and needed to load the whole model so the flick scrolling
would be responsive.The data is coming from a C++ QAbstractListModel class. All the mechanics are working good.
This model should be loaded dynamically as it isn't always needed, and resources are tight.
So I'm using Loader when needed.On the desktop, there is no noticable delay, but on the ARM board there is a 1 to 2 seconds.
I'm trying to get a BusyIndicator going (based on http://qt-project.org/wiki/Busy_Indicator_for_QML), while the model loades.
However, the model loading blocks the BusyIndicator.I had high hopes for WorkerScript, but I'm not so sure anymore.
In searching I've seen references to someone trying to "use WorkerScript for loading list model elements",
but I have not been able to piece that together or find examples to work off.
I've also seen "loading a Component in a background thread", but that doesn't appear possible.I can get together some sample code, and post it if needed. But the code would be pretty standard
to any example you find for QAbstractListModel/ListView. (http://cdumez.blogspot.com/2010/11/how-to-use-c-list-model-in-qml.html)I'm curious if anyone has ideas for approaches I should look at. Anyone who crossed this issue before, and
if there were able to solve it. If you could push or shove me in the right direction, or any direction, that would be great.Thank you
-
I found this bug report:
https://bugreports.qt-project.org/browse/QTBUG-21151Sounds promising, going to try building Qt5 from git and what happends