Detect internet browser on system



  • 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.



  • 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)).



  • 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?



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.