Profile Settings for QTsettings
<p>I have a profile which consists of Method names and its relation between each profile</p>

<pre><code>void Method::loadFrom(Settings &amp;set, bool ownGroup)
{
    Settings s("profiles.ini");
    s.beginGroup("Profiles");
    foreach (const QString &amp;group, s.childGroups()) {
        s.beginGroup(group);
        Profile *profile = new Profile();
        profile-&gt;setObjectName(group);
        profile-&gt;load(s);
        s.endGroup();

        m_currentProfileManager-&gt;m_Profiles &lt;&lt; profile;
    }
    EraObject::staticLoadFrom(set, this, ownGroup);

}

void Method::saveTo(Settings &amp;set, bool ownGroup, bool force)
{
    Settings s("profiles.ini");
    s.beginGroup("Profiles");
    foreach(Profile * profile, m_currentProfileManager-&gt;m_Profiles) {
        s.beginGroup(profile-&gt;profilename());
        profile-&gt;save(s);
        s.endGroup();
    }
    s.endGroup();
    s.sync();

    EraObject::staticSaveTo(set, this, ownGroup, force);

}
</code></pre>

<p>Now the current profile is </p>

<pre><code>[Profiles]

    %20Default\Ta=@Variant(\0\0\0\x87\x41\xa0\0\0)
    %20Default\Te=@Variant(\0\0\0\x87\x42@\0\0)
    %20Default\Texp=@Variant(\0\0\0\x87\x42\x18\0\0)
    %20Default\dirty=0
    %20Default\lim1=@Variant(\0\0\0\x87\0\0\0\0)
    %20Default\lim2=@Variant(\0\0\0\x87\0\0\0\0)
    %20Default\objectName=" Default"
    %20Default\offset=@Variant(\0\0\0\x87\0\0\0\0)
    %20Default\profilename=" Default"
    yg\Ta=@Variant(\0\0\0\x87\x41\xa0\0\0)
    yg\Te=@Variant(\0\0\0\x87\x42@\0\0)
    yg\Texp=@Variant(\0\0\0\x87\x42\x18\0\0)
    yg\dirty=1
    yg\lim1=@Variant(\0\0\0\x87\0\0\0\0)
    yg\lim2=@Variant(\0\0\0\x87\0\0\0\0)
    yg\objectName=yg
    yg\offset=@Variant(\0\0\0\x87\0\0\0\0)
    yg\profilename=yg
    yu\Ta=@Variant(\0\0\0\x87\x41\xa0\0\0)
    yu\Te=@Variant(\0\0\0\x87\x42@\0\0)
    yu\Texp=@Variant(\0\0\0\x87\x42\x18\0\0)
    yu\dirty=1
    yu\lim1=@Variant(\0\0\0\x87\0\0\0\0)
    yu\lim2=@Variant(\0\0\0\x87\0\0\0\0)
    yu\objectName=yu
    yu\offset=@Variant(\0\0\0\x87\0\0\0\0)
    yu\profilename=yu
</code></pre>

<p>I have for each Method name a profile, here its <code>default</code> and <code>yu</code>. </p>

<p>I would like for each <code>method name</code> to generate its own profile and load it and save it.
Currently all the methods load the <code>same profile</code> settings which is wrong. </p>

<p>I want each method to have its own set of profiles. </p>

<pre><code>Method is just a qstring. 
</code></pre>