Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有配置:
[Users] joe bill dona serg
我需要QStringList所有用户名。
QStringList
QSettings ini("/tmp/users.ini", QSettings::NativeFormat); ini.beginGroup("Users"); QStringList keys = ini.allKeys(); qDebug() << keys; ini.endGroup();
这不起作用:(
我将配置更改为
[Users] joe=1 bill=1 dona=1 serg=1
现在它可以工作了。