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. InvalidateFilter() and reset() - what's the difference?
Qt 6.11 is out! See what's new in the release blog

InvalidateFilter() and reset() - what's the difference?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 781 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.
  • M Offline
    M Offline
    Moschops
    wrote on last edited by
    #1

    I've got a window that essentially shows lots and lots of lines of data, in sortable columns. Tens and tens of thousands of them. Under various user-dictated states, some of them should be shown and some not. When the user changes which should be shown, invalidateFilter() is called.

    It takes ages. Absolutely ages. I look at the documentation and see that maybe I should consider using reset() instead. It seems that invalidatefilter() "invalidates the current filtering." and reset() "Resets the model to its original state".

    I must confess I don't understand the difference between the two and why one would be faster. Can someone explain it to me?

    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