Results 1 to 3 of 3

Thread: how can i list of files to QFileSystemModel?

  1. #1
    Join Date
    Oct 2011
    Posts
    160
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default how can i list of files to QFileSystemModel?

    I am using QFileSystemModel, with list view...Its working fine, displaying all the files in a particular directory...
    But now i want to display a particular set of files, (not all the files in that folder, i cant set filter)...
    I have a list of all those files....how can i display them in that list view?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: how can i list of files to QFileSystemModel?

    QFileSystemModel::setNameFilters() and it is a model after all, so you can use QSortFilterProxyModel.

  3. #3
    Join Date
    Oct 2011
    Posts
    160
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how can i list of files to QFileSystemModel?

    Thank u ....i used QFileSystemModel::setNameFilters (QStringList)
    But problem is that....model still contains the all the entries(unfiltered entries are disabled).....cant i able to display only filtered entries?

Similar Threads

  1. List all XML files in a directory
    By ouekah in forum Newbie
    Replies: 4
    Last Post: 30th August 2015, 08:47
  2. Select all files [QTableView et QFileSystemModel]
    By snooker9 in forum Qt Programming
    Replies: 0
    Last Post: 23rd December 2011, 08:17
  3. Replies: 4
    Last Post: 18th August 2010, 04:23
  4. Huge error list from qt files
    By Raccoon29 in forum Qt Programming
    Replies: 4
    Last Post: 8th September 2008, 15:22
  5. how to list out all files in a dir and sub dir
    By rajesh in forum Qt Programming
    Replies: 5
    Last Post: 14th August 2006, 14:57

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.