Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

ListView children's data performance



  • 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?


Log in to reply