Qt 6.11 is out! See what's new in the release
blog
How to make QML WebView Element use Qt::openUrlExternally for all 'new windows'?
QML and Qt Quick
2
Posts
2
Posters
2.4k
Views
1
Watching
-
Hello,
Please anyone know how to make QML WebView Element use Qt::openUrlExternally(url) instead of newWindowComponent (when clicking on link that try to open a newWindowComponent)? -
I don't think you can. You will need to create a custom "webview" qml component for that.
One approach is to use the "QWebPage::acceptNavigationRequest":http://doc.qt.nokia.com/4.7-snapshot/qwebpage.html#acceptNavigationRequest to stop the "webview" from processing the request and then open the Url using the DesktopServices