Hi ,
I am creating a QFile in my Qt program . I am using this file to read and write some text . I want to give permission for this file so that it cannot be edited (readonly) outside program . Can anyone tell me how can I do this?
Thanks
Hi ,
I am creating a QFile in my Qt program . I am using this file to read and write some text . I want to give permission for this file so that it cannot be edited (readonly) outside program . Can anyone tell me how can I do this?
Thanks
Have you tried http://qt-project.org/doc/qt-4.8/qfi...setPermissions ?
Permissions are for users not for aplications.
Actually the file should not be edited by anyone else. Through program I should be able to write and read to and from the file.
Is there any method to do this?
As Lesiok said, permissions is for users. So if you have a superuser/administrator on the machine it can do anything he likes.
The one way you can go about it is run your application under different user, and save your file in places that hidden from another users (althought superuser can modify your file nevertheless)
Another way is to encrypt your file.
Bookmarks