Results 1 to 4 of 4

Thread: sorting problem in QSetting set.allkeys() ??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default sorting problem in QSetting set.allkeys() ??

    i want to read some db names from a config file and they are ordered.
    but when i read them with allkeys , the data that i have now is sorted by allkeys!
    what can i do ?

    Qt Code:
    1. //for example
    2. QSettings settings;
    3. settings.setValue("a", Qt::white);
    4. settings.setValue("c", QSize(32, 96));
    5. settings.setValue("b", true);
    6. settings.setValue("d", false);
    7.  
    8. QStringList keys = settings.allKeys();
    9. //instead of a c b d i have a b c d !!
    To copy to clipboard, switch view to plain text mode 

    but i need a c b d ???
    any idea.

    thanks
    Last edited by jpn; 14th February 2008 at 21:29. Reason: missing [code] tags

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.