PDA

View Full Version : qsettings setvalue has something unnecessary



yj_yulin
13th June 2010, 11:23
i use qsettings to read write a ini config file. which has has one value like below:
[config]
a_key = a.1=22 a.2=10 a.3=32

well, qsettings read those values fine,but when it write to the ini file, it becomes
[config]
a_key = "a.1=22 a.2=10 a.3=32"
thus another program cann't read it.

how can i tell qsettins just write the plain value, not with added ".

i have no control with the other program, it is not related with qt too.


any clue?

wysota
13th June 2010, 17:04
how can i tell qsettins just write the plain value, not with added
Don't use forbidden characters (i.e. '=') in values.


i have no control with the other program, it is not related with qt too.
Well, the other program doesn't write the value properly. If you want to keep the incorrect format, you will have to parse the ini file yourself instead of using QSettings.

yj_yulin
14th June 2010, 06:46
i have switch to simpleini
http://code.jellycan.com/simpleini/
it works fine.