Results 1 to 1 of 1

Thread: Can't read Win7 registry value via QSettings

  1. #1
    Join Date
    Sep 2008
    Location
    Poland
    Posts
    80
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Can't read Win7 registry value via QSettings

    Hello mates

    The code below works fine on Win XP,but it shows 0 on Win7 and Win8
    Qt Code:
    1. QSettings rnidRegistryEntry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Telenor Connect\\rnid", QSettings::NativeFormat);
    2. int rnid = rnidRegistryEntry.value("Rnid").toInt();//say there is 130 here
    3. QMessageBox::about(this, 0, QString::number(rnid));//XP-shows 130, Win7 - 0
    To copy to clipboard, switch view to plain text mode 

    From what I've found out it is due to these more modern systems are more restrictive when it comes to access the registry.So my question is how to get a value from registry on the newer Windows using QSettings?

    Ah,I forgot - Qt 5.3.2,Visual Studio 2013,Qt Add-In 1.2.3
    Last edited by MasterBLB; 24th October 2014 at 08:27.

Similar Threads

  1. Replies: 6
    Last Post: 17th December 2012, 12:53
  2. QSettings and Windows registry - removing a key
    By lxman in forum Qt Programming
    Replies: 1
    Last Post: 29th July 2011, 21:43
  3. Replies: 1
    Last Post: 24th June 2011, 12:11
  4. Replies: 1
    Last Post: 19th September 2008, 16:43
  5. [QSettings] Why limiting to plain file or registry ?
    By lauranger in forum Qt Programming
    Replies: 8
    Last Post: 13th September 2006, 15: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.