Qt编程技巧 返回文件列表

QStringList QDir::entryList ( Filters filters = NoFilter, SortFlags sort = NoSort ) const

 

实例:
QString path = QFileInfo(fileName).absolutePath(); QDir dir(path); QStringList filters; filters<< "*.jpg" << "*.bmp" << "*.png"; fileList = dir.entryList(filters,QDir::Files,QDir::Name);

你可能感兴趣的:(编程,qt,Path)