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. IndexAt() of ListView fails with QSortFilterProxyModel enabled
Qt 6.11 is out! See what's new in the release blog

IndexAt() of ListView fails with QSortFilterProxyModel enabled

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.8k 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.
  • D Offline
    D Offline
    Deqing
    wrote on last edited by
    #1

    I'm using QSortFilterProxyModel to provide filtered result via a list view.

    The indexAt() of list view is working as expected before I pass any string into the QSortFilterProxyModel (i.e. by setFilterFixedString).

    However, after I passed a string to filter, the indexAt() of ListView will get mess value, returns -1 for the most of the time. Even after I removed the whole string for filtering(displaying all the data), the function still not working.

    Can anyone help? Many thanks!

    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