Qt之设置文件的读写属性
时间:2019-08-26 10:06:01
[导读] QString imagePath =QCoreApplication::applicationDirPath()+"/good.png";
if (QFile::exists(imagePath
QString imagePath =QCoreApplication::applicationDirPath()+"/good.png";
if (QFile::exists(imagePath))
{
QFile file(imagePath);
file.setPermissions(QFile::ReadOther | QFile::WriteOther);
}把图片good.png属性设置为只读,通过上述代码可以将只读属性去掉。





