Results 1 to 2 of 2

Thread: Filter all directories including hidden ones

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Filter all directories including hidden ones

    Hi,

    I'm trying to get all directories in a folder, including the hidden ones, but it seems Qt has some sort of bug when applying the filters.

    Qt Code:
    1. QDir::Filters only_dirs (
    2. QDir::Hidden |
    3. QDir::AllDirs |
    4. QDir::NoDotAndDotDot |
    5. QDir::NoSymLinks
    6. );
    To copy to clipboard, switch view to plain text mode 

    The problem is when i add the QDir::Hidden flag, it lists all the hidden files and folders and not only the folders, like i wish.

    Does anybody know any workaround?
    Thanks in advance.

  2. #2
    Join Date
    Oct 2009
    Posts
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Filter all directories including hidden ones

    Two bug reports related to this problem:
    http://bugreports.qt.nokia.com/browse/QTBUG-12965
    http://bugreports.qt.nokia.com/browse/QTBUG-12584
    The only fix I know is to use isFile() to check whether each result is a file or not.

Similar Threads

  1. Return number of directories in a directories
    By franco.amato in forum Newbie
    Replies: 7
    Last Post: 29th September 2010, 23:29
  2. Return number of directories in a directories
    By franco.amato in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2010, 18:24
  3. Adding directories to resources
    By roxton in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2008, 12:00
  4. qtopiamake bug when same name file under different directories
    By izico in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 25th October 2007, 19:02
  5. How to create directories??
    By paranoid_android in forum Qt Programming
    Replies: 3
    Last Post: 9th March 2006, 16:28

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
  •  
Qt is a trademark of The Qt Company.