Results 1 to 2 of 2

Thread: can we implement filter in model

  1. #1
    Join Date
    Jun 2015
    Location
    India
    Posts
    185
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default can we implement filter in model

    I wanted to implement a filter in model itself, I don't want to use proxy model (I am having some performance issues with this).
    So is there a way to implement filter() in model only, just like re implementing sort() function in model??
    Thanks :-)

  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: can we implement filter in model

    Of course, the model has always full control over what it exposes through its API.

    You implement rowCount(), columnCount() and data(), you decide which values to return.

    Cheers,
    _

Similar Threads

  1. How to filter duplicates from a proxy model.
    By kaushal_gaurav in forum Qt Programming
    Replies: 6
    Last Post: 14th October 2016, 11:21
  2. Replies: 6
    Last Post: 15th April 2013, 17:42
  3. Model/view, apply a filter on model
    By remy_david in forum Qt Programming
    Replies: 4
    Last Post: 4th February 2011, 18:13
  4. Set a filter on a model/view
    By graciano in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2010, 18:07
  5. Filter Proxy Model to Autoupdate View
    By Big Duck in forum Qt Programming
    Replies: 1
    Last Post: 1st June 2006, 21:32

Tags for this Thread

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.