Hi,

In my app, I want to read the media files with extension *.avi and *.mkv from the directory. But i am not able to filter them when reading through QDir. If I remove the filter I can get all the files listed in the directory. Here is my code..

Qt Code:
  1. QString path = QFileDialog::getExistingDirectory (this, tr("Directory"), directory[i].path());
  2. if ( path.isNull() == false )
  3. {
  4. directory[i].setPath(path);
  5.  
  6. qDebug() << directory[i].entryList().filter("Media files (*.mkv *avi)");
  7. }
To copy to clipboard, switch view to plain text mode 

If i Just use
directory[i].entryList()
, I get all the files. Can any one please correct me If I am fallowing wrong filter format.

Thank You,
Baluk