Hello,
i am new to Qt and trying to build a small application right now which should save its configuration to an .ini file which is checked again on app-launch to do the initial gui filling of my app.
Basically my ini has the following structure
[item01]
id=foo
path=bar
[item02]
id=bla
path=blub
Right now i am wondering what might be the best way to read the entire file at the beginning of my application.
My idea is to count the amount of groups / sections in the ini first.
In the next step i could fill my UI (QListWidget) element with an QListWidget item for each group of my ini file.
While i know that i.e.
//
QSettings settings( "myininame.ini", QSettings::IniFormat );
// keys contains all elements of settings
QStringList keys = settings.allKeys();
works and delivers me all relevant data - its not offering any sorting-option i would like.
Reading and writing single elements from/to the .ini works too.
So i am unsure how to realize the loop-structure to handle each section/group on itself.
It might help to i.e. count all sections/group at the beginning - but still not sure if i am thinking wrong here.
I hope my main starting problem is clear- would be great if someone could push my into the right direction - right now i just dont know the amount of sections/groups which makes it difficult for me to know when to end the loop 
Best regards
el
Bookmarks