Hi, On Thu, Aug 30, 2012 at 7:27 PM, Sensei <[email protected]> wrote: > On 8/30/12 4:39pm, BRM wrote: >> Are you sure 'sons' and 's.childGroups()' are the same thing? If you >> don't update 'sons' in the loop, then they're not likely the same >> thing. IIRC, 's' is manipulated as you move through the file - thus >> when you do a s.beginGroup()/s.endGroup(), then s.childGroups() will >> not be the same as that of the "root" (the file in general); it will >> only tell you what is below the level you are looking at. You can get >> around that by not using s.beginGroup()/s.endGroup() and instead >> using "group/group" and "group/value" syntax when looking something >> up, but that would carry its own drawbacks (such as dynamically >> computing the "group/group" and "group/value" strings yourself >> instead of letting QSettings handle them for you). > > Ok, that makes sense. But I am wondering: how could childGroups() > differ, in an INI file, since it does not support nested groups?
While the Microsoft-defined ini-file might not support nested groups, QSettings does. This is also mentioned in the docs, but I agree its too much hidden. Its only a short note in the last sentence of beginGroup. Andreas _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
