Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to set name filter but still list folders?

How to set name filter but still list folders?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 480 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lampard2013
    wrote on last edited by
    #1

    I am using QDir::setnameFilter to filter files.(eg. .xml).But I also want to list folders.If I call this function, folders' name will not list.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Subst27
      wrote on last edited by
      #2

      Hi!
      like this:

      void QDir::​setFilter(Filters filters)

      where filters = QDir::Dirs | QDir::Files

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved