Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[solved]Problem in QSettings with no sorting
beidaochuan last edited by beidaochuan
I used QSetting::childGroups() to get all items in INI file.
// my.ini [a] a = 1 [c] c = 2 [b] b = 3
I want to get the order a c b,
but i got abc.
how can I resolve the problem?
alex_malyu last edited by
I afraid order is and should not be preserved.
If you need a specific order you data is not grouped properly and you you need to change relation from siblings to parent child,
Otherwise it is impossible to achieve for general case.
For example you have 0 control over keys order in Windows registry (and QSettings can be used to write settings there).
So if you really insist on having specific order do not use QSettings.
beidaochuan last edited by
i will add unique id to every group and add group to QStringList so that i can get a order childGroup.