Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Continuous ListView update causing UI to stuck.
Forum Updated to NodeBB v4.3 + New Features

Continuous ListView update causing UI to stuck.

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    at_pradeep
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        at_pradeep
        wrote on last edited by
        #3

        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 ?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved