当前位置:网站首页>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())
{
//存储到相对于的位置
}
}
总结
边栏推荐
- An error, uncaught typeerror: modalfactory is not a constructor
- Leetcode 1328. 破坏回文串(可以,已解决)
- 开发那些事儿:如何解决RK芯片视频处理编解码耗时很长的问题?
- A current List of AWESOME Qt and qml
- Cv02 Roge matrix, rotation vector, angle
- [untitled] CV learning 1 conversion
- Keras深度学习实战(14)——从零开始实现R-CNN目标检测
- Synchronized lock upgrade
- A fastandrobust convolutionalneuralnetwork-based defect detection model inproductqualitycontrol-阅读笔记
- Resources for Physics based simulation in Computer Graphics 图形学中物理模拟的资源整理
猜你喜欢

Developing those things: how to solve the problem of long-time encoding and decoding of RK chip video processing?

To build agile teams, these methods are indispensable

《MySQL DBA封神打怪之路》专栏学习大纲

LeetCode 558. Intersection of quadtree

Kunlunbase online meetup is waiting for you~

Stc8h development (XIV): I2C drive rx8025t high-precision real-time clock chip

jconsole线程面板中的阻塞总数和等待总数(转)

466-82(3、146、215)

机器人开发--常用仿真软件工具

LeetCode 745. Prefix and suffix search
随机推荐
Dream CMS Front Office Search SQL Injection
ZABBIX proxy server configuration
Property analysis of rotate matrix (forwarding)
02-3、指针和引用的区别
性能优化之@Contended减少伪共享
jconsole线程面板中的阻塞总数和等待总数(转)
A fastandrobust volutionalneuralnetwork based defect detection model inproductqualitycontrol reading notes
Performance optimization @contented to reduce pseudo sharing
Leetcode 1328. 破坏回文串(可以,已解决)
Leetcode 1252. Number of odd value cells
【多线程】JUC详解 (Callable接口、RenntrantLock、Semaphore、CountDownLatch) 、线程安全集合类面试题
Hello JSON Schema
Set the interface language of CMD command prompt window to English
Play with the one-stop scheme of cann target detection and recognition
cv02-roge矩阵,旋转向量 ,角度
Automated graphical interface library pyautogui
机器人开发--常用仿真软件工具
Resources for Physics based simulation in Computer Graphics 图形学中物理模拟的资源整理
02-3、指針和引用的區別
TiFlash 性能调优