I use the following mechanism to handle clicking links in the browser:
browser->page()->setLinkDelegationPolicy(QWebPage::LinkDelegationPolicy::DelegateAllLinks); QObject::connect(browser, &QWebView::linkClicked, this, [urlHandler](const QUrl& url) { urlHandler(url); });
Thus, all links on the page are processed. But I need to intercept only certain links, for the rest I have a JS script defined, which should be executed.
Is it possible to make this behavior by standard means or is it necessary to change the source code of Qt?
Qt version used is 5.5