Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想获取位于指定目录中但最后没有扩展名的所有文件。我做了这个Qt代码:
QDir myDir(mConfigDirectory); filters << "*.ini"; myDir.setNameFilters(filters); list = myDir.entryList (); qDebug()<<list;
但我找不到将名称与扩展名分开并仅获取名称的方法?!
QFileInfo Class在这种情况下没有帮助吗?看QString QFileInfo::baseName
QFileInfo Class
QString QFileInfo::baseName