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

QListView without keeping global positions for each variable-length item



  • As far as I understand, QListView calculates and keeps each item's global position for the variable sized-items (btw, how do I specify that items are fixed size when using a custom delegate?). When filtering, sorting, or inserting items, this means there will be a recalculations of all the positions (at the very least for keeping the scrollbars correct). For large enough amount of items this would cause a slowdown. But now, suppose I don't need the scrollbars, and don't need the global positions of each item. I just want the scroll calculations to happen on the fly relying simply on the information about the currently shown items. I need to inherit and write my own class, I suppose?


  • Lifetime Qt Champion

    Hi,

    From your description you likely have to start from the QAbstractItemView class and get some inspiration from QListView and QListWidget with its grid size.



  • @SGaist Thanks for the pointers!


Log in to reply