Continuous ListView update causing UI to stuck.



  • I have one ListView which contains List of names with images.
    I am updating this list view from the javascript code using "listModel.append()"

    I have list in XML format and I am extracting data from the xml list and appending it to the ListView, I am doing this in a loop.

    But when i update the list view UI gets stuck and user can't perform any action on the UI until the list gets updated.

    I have to update the list after interval of one minute and every time i update the list UI gets stuck.

    So is there any option to update the list view in the background and then set it to ListView.

    Thanks.



  • If the blocking is actually caused by loading images, you might want to try setting the asynchronous propert: http://doc.qt.nokia.com/4.7-snapshot/qml-image.html#asynchronous-prop.

    Apart from that, perhaps you could consider using a workerscript to generate the listmodel in a background thread: http://doc.qt.nokia.com/stable/qml-workerscript.html



  • Thanks for the reply it was really helpful.

    I am trying to use WorkerScript for loading list model elements.
    But how can we stop WorkerScript once we have done with the update,
    is there any way of destroying or stopping the WorkerScript ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.