title: Save (already-existing) QSetting into an INI file
body: <p>I want to save an alredy-existing <code>QSettings</code> object into some INI file for backup.</p>
  
  <p>The <code>QSettings</code> comes from the application's global settings, ie. it can be registry, ini file, etc.</p>
  
  <hr>
  
  <p>In case it helps, my context is:</p>
  
  <pre><code>class Params
  {
      // All params as data members
      // ...
      void loadGlobal ()
      {
          Qettings s; // Global parameters, paths set by application
          // Fill data members: s.value (...);
      }
  };
  
  class Algo
  {
      Result run (Params p)
      {
          Result r = F(p);
          return r;
      }
  };
  
  int main (...)
  {
      Params p;
      p.loadGlobal ();
      Algo a;
      Result r = a.run (p);
  
      // At this point, save Result and Params into a specific directory
      // Is there a way to do:
      p.saveToIni ("myparams.ini"); // &lt;-- WRONG
  }
  </code></pre>
  
  <hr>
  
  <p>A solution would be to add a <code>saveTo (QSetting &amp; s)</code> method into the <code>Params</code> class:</p>
  
  <pre><code>class Params
  {
      void saveTo (QSettings &amp; s)
      {
          s.setValue (...);
      }
  };
  
  int main (...)
  {
      Params p;
      p.loadGlobal ();
      QSettings bak ("myparams.ini", ...);
      p.saveTo (bak);
  }
  </code></pre>
  
  <p>But I am looking for a solution without modifying the <code>Params</code> class.</p>