Just call QWebPage :: setLinkDelegationPolicy (QWebPage :: DelegateAllLinks), then connect the signal QWebView :: linkClicked (const QUrl and url) to the slot, and in the slot, execute the browser. Finding out what the default browser is is a bit more complicated and depends on which user's desktop is running. The BROWSER environment variable often contains a default value.
Or use QDesktopServices :: openUrl [as suggested by gnud in the comment]
source share