title: Reading application settings best practice
body: <p>In my desktop app I use QSettings to persist various application values.  For example, main form position, recent documents, connection paramenters and some things that alter the way the application behaves, for example "don't show this message again" on information dialogs.</p>
  
  <p>My usual way of handling this is to read all the settings into a struct or object when the application starts and save them when the application closes.</p>
  
  <p>I also have a dialog that enables me to edit many of the values in the settings object and have them saved when the dialog is closed.</p>
  
  <p>Values in the settings object will be needed by many windows and maybe non-visual objects..</p>
  
  <p>What is the best way to do this?</p>
  
  <p>I have started by having the settings object as a member of the main window, but then I have the problem of other windows needing to have access to the main window's members.  </p>
  
  <p>I did think I could have the settings object created within its own cpp file and just #include that where needed.  But I'm not sure if this possible or the syntax of it.</p>
  
  <p>What is best practice for this scenario?</p>