Results 1 to 3 of 3

Thread: Set QSettings::IniFormat globally?

  1. #1
    Join Date
    May 2006
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Set QSettings::IniFormat globally?

    As the title says, I want to set my program to use .ini files (in windows) for all QSettings objects as is achieved with QCoreApplication::setApplicationName, is this possible? The docs don't seem to say anything about it and it seems really sloppy if I set ini format every time I want to read/write my settings.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Set QSettings::IniFormat globally?

    Then maybe you should use only one QSettings object for each .ini file through the whole life of your application?

  3. #3
    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: Set QSettings::IniFormat globally?

    Or subclass QSettings, set the desired format in the constructor and use your subclass instead of QSettings in your program.

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.