#include <QDebug>
QDir dir("文件夹路径")
if(dir.count()==2)
qDebug()<<"文件夹为空"
使用QFile::exists()函数判断。参见 http://qt-project.org/doc/qt-4.8/qfile.html#exists-2
或者QFileInfo::exists()
参见:http://qt-project.org/doc/qt-4.8/qfileinfo.html#exists
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)