Results 1 to 2 of 2

Thread: QSortFilterProxyModel "inverse" filtering

  1. #1
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default QSortFilterProxyModel "inverse" filtering

    Is posible to do a "inverse" filtering with QSortFilterProxyModel?
    I have a QSortFilterProxyModel in my app, when i type "hello", all table items are hidden, except rows containing "hello", but i'd like to hide the rows containing "hello", and show all others.
    It's possible?
    Always trying to learn >.<

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QSortFilterProxyModel "inverse" filtering

    Yes, you can provide your own filtering criteria by deriving from QSortFilterProxyModel and implementing filterAcceptsRow
    http://qt-project.org/doc/qt-5/qsort...lterAcceptsRow

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    aguayro (27th September 2014)

Similar Threads

  1. QSortFilterProxyModel sorting and put in a "folder"
    By airglide in forum Qt Programming
    Replies: 0
    Last Post: 31st August 2012, 09:44
  2. Filtering "NoDotDot" in filesystem model not working
    By aurora in forum Qt Programming
    Replies: 3
    Last Post: 8th May 2012, 10:02
  3. Filtering Events on "black-box" objects
    By sebastian.f in forum Qt Programming
    Replies: 3
    Last Post: 12th June 2009, 08:35
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  5. Replies: 6
    Last Post: 3rd November 2006, 11:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.