[Solved]How to count childGroups()
-
Hi,
I need to return the number of groups in a ini file.
Example:
[1]
a=apple
b=banana
c=cat
[2]
d=dog
e=elepant
c=catThe return that I need is 2 because I have 2 groups. How can I do This?
Thanks in Advance
-
Is it a settings file for your application?
Then i would suggest something like this:
@QSettings settings;
QStringList groups = settings.childGroups();
return groups.count();@ -
Thank you Jan-Willem this works :)
-
You're welcome.
Glad I could help.