Results 1 to 5 of 5

Thread: QSettings write strange value

  1. #1
    Join Date
    Mar 2013
    Posts
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default QSettings write strange value

    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

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSettings write strange value

    How _CONVERSION_X is defined ?

  3. #3
    Join Date
    Mar 2013
    Posts
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QSettings write strange value

    Its a float

    Qt Code:
    1. float _CONVERSION_X;
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSettings write strange value

    This format is used for a float. Double is saved normally.

  5. #5
    Join Date
    Mar 2013
    Posts
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Smile Re: QSettings write strange value

    Ok thanks.

Similar Threads

  1. QSettings load and write problem in files
    By a.m.blub in forum Qt Programming
    Replies: 2
    Last Post: 11th April 2011, 06:10
  2. QSettings write and read function
    By ivareske in forum Qt Programming
    Replies: 3
    Last Post: 24th February 2011, 15:14
  3. Replies: 1
    Last Post: 14th January 2011, 11:57
  4. Replies: 6
    Last Post: 7th December 2010, 12:32
  5. Replies: 4
    Last Post: 1st February 2006, 17:17

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.