Results 1 to 8 of 8

Thread: trying to understand qsettings ...

  1. #1
    Join Date
    Mar 2011
    Posts
    45
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default trying to understand qsettings ...

    hello,
    i have a general question about qsettings, hope someone can give me some insides (could not figure it out from docs):

    i have written an application that uses qsettings to store application settings.
    where does qt actually save these ? and how can one clear these without having to clear it from application side (lets say when the application is installed) ??

    thnx.

  2. #2
    Join Date
    Oct 2010
    Location
    Berlin, Germany
    Posts
    358
    Thanks
    18
    Thanked 68 Times in 66 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: trying to understand qsettings ...

    that is platform-specific. on windows, qsettings uses the registry.

  3. #3
    Join Date
    Mar 2011
    Posts
    45
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: trying to understand qsettings ...

    ok thnx.

    but how do i clear lets say the registry (or whatever on any OS) when i install or uninstall my application so that the settings state after this is untouched like a virgin
    thnx.

  4. #4
    Join Date
    Mar 2011
    Posts
    45
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: trying to understand qsettings ...

    anyone got some ideas about this???

    i am just interested if my whole registry gets messed up because my qt application saves everything within my registry and i dont know how to get rid of these entries explicitely

    thnx

  5. #5
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: trying to understand qsettings ...

    Personnaly I have never used QSettings because I don't like the idea of writting more "garbage" to the registry. I prefer to use a QFile to read and write data, like a .ini file.
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: trying to understand qsettings ...

    Quote Originally Posted by john_god View Post
    Personnaly I have never used QSettings because I don't like the idea of writting more "garbage" to the registry. I prefer to use a QFile to read and write data, like a .ini file.
    So, kinda like using QSettings with the QSettings::IniFormat flag so it writes to a file instead of the registry?

  7. #7
    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: trying to understand qsettings ...

    Quote Originally Posted by kerim View Post
    anyone got some ideas about this???
    If you want to do this outside your application then either use some installer facilities that allow manipulating the registry or find if you can call regedit from a script in a way that would allow you to delete registry keys. If that's not an option then write a simple program that will use QSettings and delete the branches your application created.[/QUOTE]

    Quote Originally Posted by john_god View Post
    Personnaly I have never used QSettings because I don't like the idea of writting more "garbage" to the registry. I prefer to use a QFile to read and write data, like a .ini file.
    You can use QSettings to write ini files on Windows as well.
    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.


  8. #8
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: trying to understand qsettings ...

    Thank you guys, I didn't know that . Guess I should read the docs more often
    I learned another thing today
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

Similar Threads

  1. Replies: 1
    Last Post: 14th January 2011, 11:57
  2. Something i am not understand about Qt.
    By HeX0R in forum Newbie
    Replies: 8
    Last Post: 12th February 2010, 04:37
  3. need help .not able to understand.......
    By sh123 in forum Qt Programming
    Replies: 1
    Last Post: 20th January 2009, 01:50
  4. Don't understand Q_OBJECT
    By Cruz in forum Newbie
    Replies: 4
    Last Post: 19th January 2009, 12:26
  5. don't understand Qt's setCodecForCStrings
    By ber_44 in forum Qt Programming
    Replies: 1
    Last Post: 9th July 2007, 01:19

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.