Hello,
I have difficulty supplying arguments to QSettings::value()
This is in the settings file:
[domains]
1=dyndns
[dyndns]
type=dyndns
[domains]
1=dyndns
[dyndns]
type=dyndns
To copy to clipboard, switch view to plain text mode
Now if I call
qDebug() << ini.value("dyndns/type").toString();
qDebug() << ini.value("dyndns/type").toString();
To copy to clipboard, switch view to plain text mode
I get "dyndns"
But if I call
ini.beginGroup("domains");
for (int i = 0; i < l.size(); i++)
{
QString Domain
= ini.
value(l.
at(i
)).
toString(), S
= QString("%1/type").
arg(Domain
), Type
= ini.
value(S
).
toString();
qDebug() << Domain << S << Type;
}
ini.beginGroup("domains");
QStringList l = ini.allKeys();
for (int i = 0; i < l.size(); i++)
{
QString Domain = ini.value(l.at(i)).toString(), S = QString("%1/type").arg(Domain), Type = ini.value(S).toString();
qDebug() << Domain << S << Type;
}
To copy to clipboard, switch view to plain text mode
I don't get the Type string, it's empty, I get "dyndns" "dyndns/type" ""
Thanks.
Bookmarks