thank you for your supply, but your suggest doesnt work to. I have changed my code like this:
if(!myfile.
setPermissions(QFile::ReadOwner|QFile
::WriteOwner|QFile
::ExeOwner|QFile
::ReadGroup|QFile
::ExeGroup|QFile
::ReadOther|QFile
::ExeOther)) {
qDebug("Something wrong!");
}
return;
out << preview;
myfile.close();
QString savefile = QFileDialog::getSaveFileName(this,"Save File", QDir::currentPath(),fillter0) + ".desktop";
QFile myfile(savefile);
if(!myfile.setPermissions(QFile::ReadOwner|QFile::WriteOwner|QFile::ExeOwner|QFile::ReadGroup|QFile::ExeGroup|QFile::ReadOther|QFile::ExeOther))
{
qDebug("Something wrong!");
}
if(!myfile.open(QIODevice::WriteOnly | QIODevice::Text))
return;
QTextStream out(&myfile);
out << preview;
myfile.close();
To copy to clipboard, switch view to plain text mode
But it doesnt work. So i guess it is not beacause the ORed statement. Could you please show me how?
I read the Qt help, but couldnt find any thing could help.
Thank you very much.
Bookmarks