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. ListView children's data performance
Qt 6.11 is out! See what's new in the release blog

ListView children's data performance

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 245 Views
  • 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
    Adso4
    wrote on last edited by
    #1

    I'm dealing with some performance issues when working with a ListView that has delegates with a lot of data. My scenario is the following:

    I have a ListView.
    The model is defined in a class who inherits from QAbstractListModel.
    The delegate have 2 states. One showing just the item id (1 field) and other showing all fields (up to 30). So when clinking in the item, it expands/collapses showing 1 or all data fields. This is working fine.

    Now, I need to implement a new feature, which is "Expand/Collapse All". When clicking in a button, all the list's items will collapse/expand. In this point, and when the list has a lot of children, the items are expanded in a turbulent way, like step by step.

    This is not happening when the listView is short, so I assume that the issue is because of reading so many data when item is expanded.

    Is there any way to improve this behavior?

    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