QStringList XMLReader::getListOfFiltersFromDirectory()
{
QDir directory = QDir("C:\\filters");
QStringList listOfFilters = directory.entryList(QDir::Files | QDir::NoSymLinks);
QRegExp rx("*.xml");
rx.setPatternSyntax(QRegExp::Wildcard);
listOfFilters = listOfFilters.filter(rx);
return listOfFilters;
}
Showing posts with label QRegExp. Show all posts
Showing posts with label QRegExp. Show all posts
Wednesday, June 30, 2010
Get list of XML files from specified directory. QStringList,QDir,QRegExp
QStringList can be used to store the list of names of xml files which are in a directory. Following method returns the list of names of files matching the regular expression.
Labels:
cplusplus,
QDir,
QRegExp,
QStringList,
Qt
Subscribe to:
Posts (Atom)