用什么来代替c++ Qt上的glob ?

时间:2022-09-01 23:34:43

I would like to access a directory, and parse all the file in it. To do so, I found a way using on this post, but apparently it is for C, not C++ (tell me if I am wrong).

我想访问一个目录,并解析其中的所有文件。为此,我在这篇文章中找到了一种方法,但显然是用C,而不是c++(如果我错了,请告诉我)。

I am using Qt, and I would like to know which similar way to use to run through each file of my directory.

我正在使用Qt,我想知道如何使用类似的方法来运行我的目录的每个文件。

1 个解决方案

#1


5  

Have you looked at the QDir documentation ? There's all you need here and probably a lot more. Why bother with a C lib ?

您看过QDir文档吗?这里有你所需要的一切,可能还有更多。为什么要用C库呢?

#1


5  

Have you looked at the QDir documentation ? There's all you need here and probably a lot more. Why bother with a C lib ?

您看过QDir文档吗?这里有你所需要的一切,可能还有更多。为什么要用C库呢?