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. Deleting all registry entries under an organisation
Qt 6.11 is out! See what's new in the release blog

Deleting all registry entries under an organisation

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 2.1k 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by Perdrix
    #1

    After porting my application to Qt, the registry entries for the older releases will not be appropriate, so I want to delete them

    Is it possible to

    QSettings settings("HKEY_CURRENT_USER\\Software\\Organisation", QSettings::NativeFormat);
    settings.clear();

    to delete everything under there?

    JonBJ 1 Reply Last reply
    0
    • PerdrixP Offline
      PerdrixP Offline
      Perdrix
      wrote on last edited by
      #3

      This is the incantation that did the job:

      QSettings ("HKEY_CURRENT_USER\\Software\\Organisation",
      QSettings::NativeFormat).remove("");

      David

      1 Reply Last reply
      0
      • PerdrixP Perdrix

        After porting my application to Qt, the registry entries for the older releases will not be appropriate, so I want to delete them

        Is it possible to

        QSettings settings("HKEY_CURRENT_USER\\Software\\Organisation", QSettings::NativeFormat);
        settings.clear();

        to delete everything under there?

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #2

        @Perdrix
        The last time this seems to have been asked here the answer was "why not try":
        https://forum.qt.io/topic/72671/qsettings-delete-registry-path

        Also see
        https://www.qtcentre.org/threads/43514-QSettings-and-Windows-registry-removing-a-key?p=198652#post198652
        https://www.qtcentre.org/threads/42697-How-to-remove-a-QSettings-registry-group?p=195270#post195270

        1 Reply Last reply
        1
        • PerdrixP Offline
          PerdrixP Offline
          Perdrix
          wrote on last edited by
          #3

          This is the incantation that did the job:

          QSettings ("HKEY_CURRENT_USER\\Software\\Organisation",
          QSettings::NativeFormat).remove("");

          David

          1 Reply Last reply
          0
          • Pl45m4P Pl45m4 referenced this topic on

          • Login

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