title: Qt ,C++ - Adding QDIR::Filters to directories and files
body: <p>I am trying to retrieve the files and directories in Qt using the QDir Filter. Based on the user input from the command line I plan to set the appropriate filters and retrieve the corresponding files.  </p>
  
  <p>User Input Eg: <code>./Retrieve  -d C:/Sample -h</code></p>
  
  <p>would retrieve me all the files including hidden files in the directory C:/Sample. I plan to give a host of other options like</p>
  
  <p><code>-h (for hidden files)
     -r (for readonly files)
    -s (for system files)</code></p>
  
  <p>currently my code is something like </p>
  
  <blockquote>
    <p>QDir::entryList(QDir::Dirs
    |QDir::NoDotAndDotDot | QDir::Hidden)</p>
  </blockquote>
  
  <p>If I want to fetch even the system files I need to add just the <code>Qdir::system filter</code> . 
  How can I append this to the existing filters I would have already mentioned.
  My question is How do I add these filters to the QDir function entry List by having simple online code but build up the filters by looking at the user input?</p>