title: Qt reading ini file doesn't return the value
body: <p>Using notepad, I've created the following config.ini file and placed it the same folder as the application:</p>
  
  <pre><code> [Test]
   TestVal=5
  </code></pre>
  
  <p>In Qt5, when I try to read the value (5), it always returns with the default (8) instead of the value from the file:</p>
  
  <pre><code> QSettings settings(QDir::currentPath() + "/config.ini", QSettings::IniFormat);  
   settings.sync();
   settings.beginGroup("Test");
   ValRead = settings.value("TestVal", 8).toInt();
   settings.endGroup();
  </code></pre>
  
  <p>I've tried without setting the Group, and just specifying the value of "Test\TestVal" but no luck.  Is there a way to see if the ini file is properly formatted?</p>