Results 1 to 3 of 3

Thread: QSettings: failed to set subkey

  1. #1
    Join Date
    Nov 2011
    Posts
    14
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4 Qt Jambi
    Platforms
    MacOS X Windows

    Default QSettings: failed to set subkey

    Hi everyone!

    Got this error message: QSettings: failed to set subkey

    The message is clear, but I don not have subkeys..

    What else can it be?

    Thank you!

  2. #2
    Join Date
    Nov 2011
    Posts
    14
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4 Qt Jambi
    Platforms
    MacOS X Windows

    Default Re: QSettings: failed to set subkey

    After some time I figured out that the problem is in setValue method:
    Qt Code:
    1. QStringList documents;
    2.  
    3. for(int i=0;i<length();i++)
    4. {
    5. documents<<at(i);
    6. }
    7.  
    8. settings.beginGroup("RecentFiles");
    9. settings.setValue("FileList",documents); // the error occurs here
    10. settings.endGroup();
    To copy to clipboard, switch view to plain text mode 

    It has to do smth with QStringList.

    Before QStringList documents; was declared in h file, but know it works
    Last edited by Mint87; 26th April 2013 at 15:10.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QSettings: failed to set subkey

    beginGroup() creates a subkey.

Similar Threads

  1. use if in row element failed
    By hashb in forum Qt Quick
    Replies: 1
    Last Post: 2nd June 2012, 20:08
  2. QtCreator, GDB: Failed...
    By Dovgon in forum Qt Tools
    Replies: 0
    Last Post: 25th January 2011, 13:03
  3. Replies: 1
    Last Post: 14th January 2011, 12:57
  4. Qt 4.7.0 compilation failed
    By Nivlag in forum Newbie
    Replies: 3
    Last Post: 16th November 2010, 04:07
  5. Migrate Qt3 QSettings to Qt4 QSettings
    By hvengel in forum Qt Programming
    Replies: 3
    Last Post: 22nd February 2008, 04:21

Tags for this Thread

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.