QSettings not connecting to .ini file
-
Hi,
I have a .ini file states.ini which I am trying to connect to QSettings. To test it out, in my .ini file I have
@
[screen]
position="one"
[myConnection]
ip="162.30.0.5"
port=6543
@
In my Qt c++, I have
@
QSettings settings(QString("folderWithinHome/subfolder/states.ini"), QSettings::IniFormat);
QString someValue = settings.value("myConnection/ip", "none").toString();
qDebug() << someValue;
@
However, this returns "none." Any ideas as to why it doesn't correctly find the ip address in the .ini file?