Results 1 to 3 of 3

Thread: qsettings setvalue has something unnecessary

  1. #1
    Join Date
    Oct 2008
    Posts
    10
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default qsettings setvalue has something unnecessary

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qsettings setvalue has something unnecessary

    Quote Originally Posted by yj_yulin View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    yj_yulin (14th June 2010)

  4. #3
    Join Date
    Oct 2008
    Posts
    10
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qsettings setvalue has something unnecessary

    i have switch to simpleini
    http://code.jellycan.com/simpleini/
    it works fine.

Similar Threads

  1. How to avoid unnecessary chars in QStringList item?
    By crazymoonboy in forum Qt Programming
    Replies: 3
    Last Post: 13th August 2009, 11:02
  2. Problem in setValue for QAccessibleWidget
    By Rakesh_Kumar in forum Qt Programming
    Replies: 0
    Last Post: 29th January 2009, 09:36
  3. Avoiding unnecessary files and folder in Impelementation
    By salmanmanekia in forum Qt Programming
    Replies: 2
    Last Post: 30th May 2008, 14:54
  4. QSqlRecord setValue doesn't set the value
    By sgmurphy19 in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2008, 20:20
  5. SetValue
    By phillip_Qt in forum Qt Programming
    Replies: 4
    Last Post: 3rd October 2007, 22:45

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.