[solved]Problem in QSettings with no sorting
-
I used QSetting::childGroups() to get all items in INI file.
for example:// 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? -
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.
-
@alex_malyu
i will add unique id to every group and add group to QStringList so that i can get a order childGroup.