Results 1 to 4 of 4

Thread: List sub-directories for a specified directory

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2015
    Posts
    16
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Question List sub-directories for a specified directory

    Hi , I want to list all the subdirectories from a directory i got from the input. But i don't know how to do it. Can anyone hep me with this ?

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: List sub-directories for a specified directory

    Look at QDir, QDir::entryList(), and QDir::entryInfoList() and use a filer in the QDir constructor or QDir::setFilter to ensure you get only directory entries, etc.

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

    Arshia Aghaei (5th July 2015)

  4. #3
    Join Date
    Jul 2015
    Posts
    16
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: List sub-directories for a specified directory

    How to for example find all *.dll files in the directory (Extension filter) ?

  5. #4
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: List sub-directories for a specified directory

    Use the name filter to filter based on file names, which includes extensions. i.e. *.dll

  6. The following user says thank you to jefftee for this useful post:

    Arshia Aghaei (1st July 2015)

Similar Threads

  1. QDir, list all directories?
    By hakermania in forum Newbie
    Replies: 10
    Last Post: 1st July 2015, 05:41
  2. Fast solution to list directories recursively
    By stereoMatching in forum Qt Programming
    Replies: 1
    Last Post: 27th July 2014, 16:47
  3. Replies: 0
    Last Post: 15th April 2011, 11:03
  4. Replies: 3
    Last Post: 31st March 2011, 13:10
  5. Replies: 4
    Last Post: 18th August 2010, 04:23

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.