Results 1 to 2 of 2

Thread: How to remove a QSettings registry group

  1. #1
    Join Date
    May 2011
    Posts
    27
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Question How to remove a QSettings registry group

    Hello,
    my application uses QSettings to save some states in several groups. The user has the ability to remove these keys manually. But when a group has no keys any more i want to delete it, but how can i do this?

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: How to remove a QSettings registry group

    Qt Code:
    1. settings.beginGroup("groupname");
    2. settings.remove(""); //removes the group, and all it keys
    3. settings.endGroup();
    To copy to clipboard, switch view to plain text mode 

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

    seux (27th June 2011)

Similar Threads

  1. Replies: 2
    Last Post: 1st March 2011, 17:00
  2. QSettings and colons in group name
    By anthon in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2010, 18:01
  3. Replies: 1
    Last Post: 19th September 2008, 15:43
  4. [QSettings] Why limiting to plain file or registry ?
    By lauranger in forum Qt Programming
    Replies: 8
    Last Post: 13th September 2006, 14:25
  5. QSettings again ... how to remove array elements
    By Mike in forum Qt Programming
    Replies: 4
    Last Post: 11th January 2006, 08:58

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.