Qt编程技巧 返回文件列表 Posted on 2009-10-26 In 技术笔记 1QStringList QDir::entryList ( Filters filters = NoFilter, SortFlags sort = NoSort ) const 实例: 12345QString path = QFileInfo(fileName).absolutePath();QDir dir(path);QStringList filters;filters<< "*.jpg" << "*.bmp" << "*.png";fileList = dir.entryList(filters,QDir::Files,QDir::Name);