Get the defaults programs
i use c++ and qt for a project. I would to know how i can get the default program : default navigato开发者_JAVA技巧r, default mail client, default editor ...
I found for Linux - Gnome: gconftool!
What is for Windows, Mac Os or Linux (KDE) ?
Thanks you.
If you look at the documentation for QDesktopServices::openUrl() you will see that:
If a mailto URL is specified, the user's e-mail client will be used to open a composer window containing the options specified in the URL, similar to the way mailto links are handled by a Web browser.
So using QDesktopServices::openUrl() you should be able to open both the default navigator and default mail client.
I assume you want to open these applications and not just find out what they are.
On Windows this kind of stuff can be recovered directly from the registry (regedit).
Search the web to find out the specific registry paths, like this.
According to Microsoft you should not use the registry directly. See : http://msdn.microsoft.com/en-us/library/windows/desktop/cc144154(v=vs.85).aspx
精彩评论