Detect internet browser on system
-
wrote on 26 Jul 2010, 12:40 last edited by
Hello All,
Is it possible to detect which browsers are installed on the system?
Also is it possible to open these browsers using Qt window by adding a button?
Thanking you in advance. -
wrote on 26 Jul 2010, 12:54 last edited by
For opening in default system browser you can use
@bool QDesktopServices::openUrl ( const QUrl & url ) [static]@
But AFAIK you cannot detect all browsers (btw it is near to impossible using non only Qt, but system API too, because not all browsers can be registered in registry (Windows case)/package management system (package-based Linux case)). -
wrote on 26 Jul 2010, 13:01 last edited by
Thanks for the reply, but if I know, that I have say 3 browsers on the system, then to open them using Qt, will I have to use something like QProcess and the installation path?
-
wrote on 26 Jul 2010, 15:58 last edited by
If you know path, where browser is located and you know what this browser is (to pass correct command line parameters to it) than you can you QProcess to run browser with parameters to open URL in it.
1/4