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);