PDA

View Full Version : QSettings write strange value



rspock
29th June 2013, 11:59
Hi,

when I try to write float values to a ini settings file I get "Conversion=@Variant(\0\0\0\x87?\x9dp\xa4)" write the parameters in such way

settings.setValue("ASSE_X/Conversion",_CONVERSION_X);

where _CONVERSION_X is a float value.

When i read the parameters I get the right value so maybe it is everything ok but I expected that the value in the ini file looks like Conversion=XXX.XX

Lesiok
29th June 2013, 13:14
How _CONVERSION_X is defined ?

rspock
30th June 2013, 18:05
Its a float


float _CONVERSION_X;

Lesiok
30th June 2013, 18:50
This format is used for a float. Double is saved normally.

rspock
30th June 2013, 19:23
Ok thanks.