Results 1 to 3 of 3

Thread: Hiding files which don´t fit the filter

  1. #1
    Join Date
    May 2009
    Location
    Brazil
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Hiding files which don´t fit the filter

    Hi there,

    This is a very simple doubt, but I can´t make it work.
    I have a treeview and a filter. I want this treeview to show just what the namefilter ("*.exe") is configured to.
    When I set the namefilter, all the files become gray (disabled) but the ones which fit the namefilter. I don´t want them to disable, I want them to disappear from the treeview.
    This should be very simple, but I can´t find a solution.

    Thanks,

    Percy.

  2. #2
    Join Date
    Aug 2006
    Posts
    221
    Thanks
    3
    Thanked 29 Times in 19 Posts

    Default Re: Hiding files which don´t fit the filter

    Your description is so incomplete it borders uselessness. QTreeView has no filters. The models have. Or can have. So I suppose you are talking about QFileSystemModel.
    This class has a method: void setNameFilterDisables ( bool enable )

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

    Percy (30th April 2010)

  4. #3
    Join Date
    May 2009
    Location
    Brazil
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Hiding files which don´t fit the filter

    Thanks, Kumosan!
    Worked properly!

Similar Threads

  1. Listing files by filter on Macbook
    By dwarnold45 in forum Newbie
    Replies: 2
    Last Post: 30th March 2010, 05:01
  2. Hiding a QToolButton in a QToolBar
    By elcuco in forum Qt Programming
    Replies: 3
    Last Post: 24th November 2009, 21:35
  3. QDirModel (filter files, custom Icon, look)
    By prashant in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2009, 10:39
  4. hiding mouse on second screen
    By safknw in forum KDE Forum
    Replies: 1
    Last Post: 24th November 2006, 12:09
  5. QAbstractTableModel row hiding and sorting
    By Rayven in forum Qt Programming
    Replies: 2
    Last Post: 23rd August 2006, 03:39

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.