Skip to content

Instantly share code, notes, and snippets.

@nowrep
nowrep / gist:1810670
Created February 12, 2012 20:11
Iterate through all groups and keys in QSettings
QString allGroupsString;
QSettings* settings = Settings::globalObject();
foreach (const QString &group, settings->childGroups()) {
QString groupString = QString("<table><th>..%1..</th>").arg(group);
settings->beginGroup(group);
foreach (const QString &key, settings->childKeys()) {
groupString.append(QString("<tr><td>%1</td><td>%2</td></tr>").arg(key, settings->value(key).toString()));
}