Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QListView without keeping global positions for each variable-length item
Qt 6.11 is out! See what's new in the release blog

QListView without keeping global positions for each variable-length item

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 306 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.
  • coaxmetalC Offline
    coaxmetalC Offline
    coaxmetal
    wrote on last edited by coaxmetal
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      coaxmetalC 1 Reply Last reply
      1
      • SGaistS SGaist

        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.

        coaxmetalC Offline
        coaxmetalC Offline
        coaxmetal
        wrote on last edited by
        #3

        @SGaist Thanks for the pointers!

        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