I want to run the equivalent for that .reg file:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\xmpp]
@="URL:XMPP Protocol"
"EditFlags"=dword:00000002
"URL Protocol"=""
[HKEY_CLASSES_ROOT\xmpp\shell]
[HKEY_CLASSES_ROOT\xmpp\shell\open]
[HKEY_CLASSES_ROOT\xmpp\shell\open\command]
@="<application to execute> %l"

I'm not sure if I do create the reg file and execute it, or if I can adopt a more straightforward approach.

As you suggested, I'll take a look at QDesktopServices.