Results 1 to 5 of 5

Thread: SetValue

  1. #1
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Smile SetValue

    Can any body tell me, where QSetting::SetValue() stores data while we are running it in linux platform.
    Thank you all.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: SetValue

    It's all listed in QSettings docs: http://doc.trolltech.com/4.3/qsettin...specific-notes
    J-P Nurmi

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

    phillip_Qt (3rd October 2007)

  4. #3
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: SetValue

    I think it's in your home directory, in a directory named after the application name.
    Although I am not sure.

    And SetValue only stores the value in the settings. Saving the settings makes the value appear in the file.

  5. The following user says thank you to marcel for this useful post:

    phillip_Qt (3rd October 2007)

  6. #4
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: SetValue

    I dont know about linux but in windows it saves in
    HKEY_CURRENT_USER/Software/...

    eg:
    QSettings settings("KeyName", "subKeyname");
    settings.setValue("DataName", value);
    then it saves in
    HKEY_CURRENT_USER/Software/keyName/subKeyname

  7. The following user says thank you to rajesh for this useful post:

    phillip_Qt (3rd October 2007)

  8. #5
    Join Date
    Mar 2007
    Posts
    19
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: SetValue

    In general the config file for linux is located at
    Qt Code:
    1. ~/.config/<Organization Name>/<Application Name>.conf
    To copy to clipboard, switch view to plain text mode 

    Where the file goes depends on how you set the application name / organization name in your program.

    For instance:
    Qt Code:
    1. setOrganizationName ("MyOrganization");
    2. setApplicationName ("MyApplication");
    To copy to clipboard, switch view to plain text mode 

    The config file would be in
    Qt Code:
    1. ~/.config/MyOrganization/MyApplication.conf
    To copy to clipboard, switch view to plain text mode 

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.