Hi,
Is there any way to add files (text ones) to recources by the code?
When i'm saying adding i mean creating new txt file in resources location, and than write and read from it...
if is posible pls example or method how to...
Thanks
Hi,
Is there any way to add files (text ones) to recources by the code?
When i'm saying adding i mean creating new txt file in resources location, and than write and read from it...
if is posible pls example or method how to...
Thanks
You cannot modify a resource while the application is executing (if that is what you are asking) as the resource is compiled into the application binary. What exactly do you need it for?
thanks for reply,
I whanna make application that allows u to save some texts which would be only editable and readable by the same program...
i don't whant to have folder full of .txt files
soo what should i use than?
i thought resources were made for that :/
Resources are generally used to contain files that you (the developer) add to the project. Things like image files for icons, for example. They are compiled into the executable so you don't have to ship the images files along with the app.i thought resources were made for that :/
Why don't you look at QSettings - this is intended to do exactly what you are describing, creating a text file of parameters or options used by a program to customize it to a user's needs.
Alternatively a simple sqlite database can be used to store data in a single blob that accompanies the program.
Even with text files there should be no problem.
All moderns operating systems have application specific data locations, i.e. a folder for each app that it can store its data into.
Cheers,
_
Bookmarks