PDA

View Full Version : Set QSettings::IniFormat globally?



Slip Nine
10th June 2006, 20:42
As the title says, I want to set my program to use .ini files (in windows) for all QSettings objects as is achieved with QCoreApplication::setApplicationName, is this possible? The docs don't seem to say anything about it and it seems really sloppy if I set ini format every time I want to read/write my settings.

jacek
10th June 2006, 22:20
Then maybe you should use only one QSettings object for each .ini file through the whole life of your application?

wysota
10th June 2006, 22:43
Or subclass QSettings, set the desired format in the constructor and use your subclass instead of QSettings in your program.