PDA

View Full Version : Reading a section from ini file with QSettings?



tomason16
3rd June 2009, 19:35
Hello,

I managed to do everything with QSettings, except the one thing I really need and this is reading all the configurations under a certain section in an INI file.

for example:

[Configuration20]
bla1=value
bla2=value2

I would like to get a some kind of a list, with bla1, bla2 and their values too along with the keys, while having only the name Configuration20 as an input.

Will be glad if someone can guide me through.

Thank you very much.

wysota
3rd June 2009, 20:59
See QSettings::beginGroup() and QSettings::childKeys().

gye325
26th July 2011, 17:08
hi there,

how do i read an integer from the title? in this case the 20 from configuration20

thanks!

wysota
26th July 2011, 18:59
Run a regexp search against the section name.