Use that function:
QDir::entryList ( const QStringList & nameFilters, Filters filters
= NoFilter, SortFlags sort
= NoSort
) const
QDir::entryList ( const QStringList & nameFilters, Filters filters = NoFilter, SortFlags sort = NoSort ) const
To copy to clipboard, switch view to plain text mode
Simple example:
filters << "*.xml"; //append your xml filter. You can add other filters here
foreach
( QString file, dir.
entryList(filters,
QDir::Files) )// do wathever with *.xml files
QDir dir(yourPath);
QStringList filters;
filters << "*.xml"; //append your xml filter. You can add other filters here
foreach ( QString file, dir.entryList(filters, QDir::Files) )
// do wathever with *.xml files
To copy to clipboard, switch view to plain text mode
Have look as well at http://doc.trolltech.com/4.6/qdir.html#setNameFilters
Bookmarks