[Qt-interest] A Question about using QSettings
Sean Harmer
sean.harmer at maps-technology.com
Thu Jan 14 09:55:59 CET 2010
Hi,
On Thursday 14 January 2010 01:17:04 Tiago Correia wrote:
> Hi,
>
> QSettings is enough I think. And you can even use just 1 file.
>
> QSeetings supports groups, and a groups can have a sub group, so you can
> play a little with this.
>
> Also I recommend that you use the default locations, the make sure the
> application works even if it is a user without admin priviliges.
>
> On Thu, Jan 14, 2010 at 12:23 AM, Dan White <ygor at comcast.net> wrote:
> > I have an application with an increasingly complex set of GUI controls.
> > I want to try and save the control settings so that the user can
> > return to the application to the same state without having to
> > reconfigure each control.
> >
> > QSettings seems to be made for the task.
> >
> > But what if I want to save multiple configurations ?
> >
> > Can I have multiple QSettings output files to reload into the
> > application or should I use another class ?
If you use the ini file format for QSettings then you can specify the filename
in the constructor. That way you can also ship several example settings files
with your app.
HTH,
Sean
More information about the Qt-interest-old
mailing list