PDA

View Full Version : [SOLVED] Recreate .ini file



el
3rd December 2009, 11:46
Hi,

i am working on a small application which stores some values in an .ini file. That is realized using QSettings & iniFormat.

While launching the app i check if the file exists - and read the informations if possible.

Right now i am wondering about one case

What happens if there is no .ini at all ?

What is the best way to create (in the background) a new file (with some example data) on a defined location after asking the user if the file should be re-created ?


Any idea or help is appreciated
Best regards
el

wysota
3rd December 2009, 12:03
Just add data to the settings object. The file will be created for you if it doesn't exist.

el
3rd December 2009, 12:19
That was too simple - thanks wysota for the quick reply & brain-freeing input :)