0
点赞
收藏
分享

微信扫一扫

Qt之判断文件/文件夹是否存在

舍予兄 2022-02-11 阅读 152
   //文件夹是否存在
    static bool FolderIsExist(QString strFolder)
    {
        QDir tempFolder(strFolder);
        return tempFolder.exists();
    }

    //文件是否存在
    static bool FileIsExist(QString strFile)
    {
        QFile tempFile(strFile);
        return tempFile.exists();
    }
举报

相关推荐

0 条评论