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. How to detect when QSortFilterProxyModel has finished filtering
Forum Update on Monday, May 27th 2025

How to detect when QSortFilterProxyModel has finished filtering

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 371 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.
  • Q Offline
    Q Offline
    qtstarter101
    wrote on last edited by
    #1

    I am in need of some way to tell when filtering has been completed on my model and I'm wondering if there is a reliable way to capture when this occurs so I can call some other function.

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

      What about? https://doc.qt.io/qt-5/qabstractitemmodel.html#canFetchMore

      Q 1 Reply Last reply
      0
      • 6thC6 6thC

        What about? https://doc.qt.io/qt-5/qabstractitemmodel.html#canFetchMore

        Q Offline
        Q Offline
        qtstarter101
        wrote on last edited by
        #3

        @6thC I'm not sure I understand how this would work with what I want to achieve.

        JonBJ 1 Reply Last reply
        0
        • Q qtstarter101

          @6thC I'm not sure I understand how this would work with what I want to achieve.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @qtstarter101
          I don't think there is any evidence that Qt "finishes" filtering. It just guarantees that the rows it "returns" obey the filter. canFetchMore(), or possibly rowCount(), may be as good as it gets. See also possibly https://doc.qt.io/qt-5/qsortfilterproxymodel.html#dynamicSortFilter-prop.

          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