What i’m trying to do is to check if a registry key (NOT VALUE, KEY) exists in the registry. I can’t find any way to check that.
Idea?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
EDIT:
In 2011 I wrote:
But it appears in the answer by @mateuszb that QSettings can open Windows keys if you use
QSettings::NativeFormat:http://doc.qt.io/qt-5/qsettings.html#Format-enum
I’d still suggest that if you are hardcoding something like “HKEY_LOCAL_MACHINE” into your source, that you are not really in the spirit of abstracting your code across platforms in the way that Qt intends. But you apparently can (at least in recent Qt versions) do this without digging beneath Qt and calling the Windows registry APIs.