Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] QSettings: Remove entire group from ini file
Qt 6.11 is out! See what's new in the release blog

[SOLVED] QSettings: Remove entire group from ini file

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 8.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vezprog
    wrote on last edited by
    #1

    Is there a way to remove an entire group from an inifile?

    I know if you use remove() with a blank string "" you remove all keys in the group, but correct me if I am wrong, I don't believe it removes the group name...

    Anyone have an idea in how I could do this other than parsing the file?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      The first example of "QSettings::remove() ":http://doc.qt.nokia.com/4.7/qsettings.html#remove is exactly what you want.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vezprog
        wrote on last edited by
        #3

        ahh I see. I was a little confused of what they were trying to do.

        Alls I would need to do is

        @
        inifile->remove(groupname);
        @

        Ill try it out, thank you!

        Edit: Its tested and works great, thank you for your help :)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved