PDA

View Full Version : Configuration files



rbp
1st April 2009, 06:22
hello,

what is your approach to configuration files in your Qt app?

Previously with PyQt I used the ConfigParser (http://docs.python.org/library/configparser.html) library which supports reading Windows style INI files.
Now I'm using C++ Qt and am looking for a suitable library.

Is there a relevant Qt class I've missed? (but not XML)

thanks,
Richard

munna
1st April 2009, 06:41
Try QSettings ?

rbp
1st April 2009, 06:45
I'm currently using QSettings but it stores my data in the registry, but I want to use a text file in the current directory.

rbp
1st April 2009, 06:47
oh I just found the format flag (http://doc.trolltech.com/4.5/qsettings.html#Format-enum) - thanks for the pointer