Results 1 to 3 of 3

Thread: QDirModel filter drive

  1. #1

    Unhappy QDirModel filter drive

    I use QDirModel in QTreeView, now I want to filter drive like DVD or CD drive ,and only save the local system drive. I know maybe rewrite the QDirModel, but I cant . can you help me? best have the example code, very thanks.
    filter.png

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDirModel filter drive

    You can use or subclass QSortFilterProxyModel to filter out entries from the base model.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3

    Default Re: QDirModel filter drive

    Quote Originally Posted by wysota View Post
    You can use or subclass QSortFilterProxyModel to filter out entries from the base model.
    thanks, I did it.

Similar Threads

  1. Drive sql
    By lucasbemo in forum Newbie
    Replies: 3
    Last Post: 4th November 2010, 18:33
  2. How to get the Drive letter
    By newb in forum Qt Programming
    Replies: 10
    Last Post: 10th June 2010, 13:59
  3. QDirModel (filter files, custom Icon, look)
    By prashant in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2009, 09:39
  4. How to get system drive?
    By Raccoon29 in forum General Programming
    Replies: 2
    Last Post: 23rd November 2008, 14:13
  5. Need help on mount nfs drive in Qt
    By tho97 in forum Qt Programming
    Replies: 3
    Last Post: 28th November 2007, 19:26

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.