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 jumps on sort

ListView jumps on sort

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 713 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.
  • M Offline
    M Offline
    MartinD
    wrote on last edited by
    #1

    Hi,
    is there any easy way to prevent ListView jumping back to the first item when sorting is executed (SortFilterProxyModel)?

    I can think of a hack - store pointer to the item which is currently visible at the top of the ListView, execute sort, scroll to the stored pointer. But is there easier way?

    1 Reply Last reply
    0
    • 6thC6 Offline
      6thC6 Offline
      6thC
      wrote on last edited by
      #2

      http://doc.qt.io/qt-5/qml-qtquick-listview.html#positionViewAtIndex-method ?

      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