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..
QString path
= QFileDialog::getExistingDirectory (this, tr
("Directory"), directory
[i
].
path());
if ( path.isNull() == false )
{
directory[i].setPath(path);
qDebug() << directory[i].entryList().filter("Media files (*.mkv *avi)");
}
QString path = QFileDialog::getExistingDirectory (this, tr("Directory"), directory[i].path());
if ( path.isNull() == false )
{
directory[i].setPath(path);
qDebug() << directory[i].entryList().filter("Media files (*.mkv *avi)");
}
To copy to clipboard, switch view to plain text mode
If i Just use , I get all the files. Can any one please correct me If I am fallowing wrong filter format.
Thank You,
Baluk
Bookmarks