当前位置:网站首页>qt 实现遍历文件夹
qt 实现遍历文件夹
2022-07-17 14:56:00 【InfoQ】
前言
第一步:获取文件夹的目录,将目录作为参数,获取文件夹下的所有文件文件夹。
QDir dir(dirPath);
QFileInfoList fileInfoList = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::Dirs);
第二步 获取列表中的文件文件夹
foreach (auto fileInfo, fileInfoList) {
if(fileInfo.isDir())
{
getFileListUnderDir(fileInfo.absoluteFilePath());
}
if(fileInfo.isFile())
{
//存储到相对于的位置
}
}
总结
边栏推荐
猜你喜欢

XSS. haozi. Me brush questions

03-1、内联函数、auto关键字、typeid、nullptr

【PostgreSQL 】PostgreSQL 15对distinct的优化

热议:老公今年已经34周岁想读博,以后做科研,怎么办?

Mpu9250 ky9250 attitude, angle module and mpu9250 MPL DMA comparison

LeetCode刷题——查找和最小的 K 对数字#373#Medium

Download of common getshell tools

synchronized锁升级

466-82(3、146、215)

jconsole线程面板中的阻塞总数和等待总数(转)
随机推荐
Deep Learning for Generic Object Detection: A Survey-论文阅读笔记
JVM钩子hooks函数
Hello JSON Schema
Set the interface language of CMD command prompt window to English
mysql show processlist 详解
Docker install MySQL
TiKV 内存参数性能调优
Dream CMS foreground search SQL injection
梦想CMS 前台搜索SQL注入
QT -- excellent open source project
TCP拥塞控制详解 | 7. 超越TCP
Dream CMS Front Office Search SQL Injection
【二叉树】之力扣牛客必刷题
Microservice online specification
Déléguer un chargeur tel qu'un parent
Similarities and differences between OA system and MES system
cv02-roge矩阵,旋转向量 ,角度
委派双亲之类加载器
TiKV Follower Read
A fastandrobust convolutionalneuralnetwork-based defect detection model inproductqualitycontrol-阅读笔记