Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] N950 writable folders
Hi, I have to manage some data to be written on files in the N950 environment. When the package is installed it is put in the folder
I have configuration files that are included in the application that I put in a /data/ folder that I find on the device in
The files that I will write at runtime - as logic suggest - maybe put in the
Regardless that I know what is the application folder, I build the data folder path using a call to QApplication::applicationDirPath() as shown in the snippet below
Is there a similar way to acquire the path of the current user folder where I can create my folders, save files etc. or I should use the string "/home/user/" as a constant ?
Many thanks for any suggestion.
DenisKormalev last edited by
I think that QDir::homePath() should help you
Thank you Denis,
now I will check what other parameters can be obatined from QDir. :)
@Denis: thanks, this is the right way. I can manage almost all the essential system folders and create new ones in the writable folders (user permissions).
mismail last edited by
I have a similar problem.
my application contains a database that i should write in at runtime.
but I always get the following message in the console.
bq. "attempt to write a readonly database Unable to fetch row"
I think it a problem of permissions.
My application deployed to
and the database deployed to
I deployed it using the following lines in the pro file
db.files = faces.db
db.path = /home/user/myApplication/data
INSTALLS += db
So how could I make it writable for the user?
Thanks in advance