Results 1 to 5 of 5

Thread: QSettings putting Windows registry keys in the wrong location

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default QSettings putting Windows registry keys in the wrong location

    QSettings putting Windows registry keys in the wrong location. Here's how I'm using it:

    Qt Code:
    1. QSettings *registry = new QSettings("HKEY_CLASSES_ROOT\\SystemFileAssociations", QSettings::NativeFormat);
    2. registry->setValue("TEST", "Test");
    To copy to clipboard, switch view to plain text mode 

    It's putting a subkey "TEST" with a value "Test" properly, but it's saving it here instead:
    HKEY_CURRENT_USER\Software\Classes\SystemFileAssoc iations (Ignore the space... the forum is messing it up)

    How do I make it place the key where I tell it to place it, instead of where it thinks I should place it?


    [edit:] Qt 4.7 on Windows 7 32bit Home and Premium
    Last edited by ComServant; 26th October 2011 at 22:35.

Similar Threads

  1. QSettings and Windows registry - removing a key
    By lxman in forum Qt Programming
    Replies: 1
    Last Post: 29th July 2011, 20:43
  2. Replies: 1
    Last Post: 24th June 2011, 11:11
  3. reading windows registry
    By bhogasena in forum Qt Programming
    Replies: 3
    Last Post: 26th January 2009, 09:36
  4. Replies: 1
    Last Post: 19th September 2008, 15:43
  5. [QSettings] Why limiting to plain file or registry ?
    By lauranger in forum Qt Programming
    Replies: 8
    Last Post: 13th September 2006, 14:25

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
  •  
Qt is a trademark of The Qt Company.