我想计算目录中的文件数,我在 QDir 类中使用了 count 方法,但它总是返回文件数加二!它为什么要做这个工作? 谢谢
你应该使用flags QDir::Filters with QDir::NoDotAndDotDot
flags QDir::Filters
QDir::NoDotAndDotDot