Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to make QML WebView Element use Qt::openUrlExternally for all 'new windows'?
Forum Updated to NodeBB v4.3 + New Features

How to make QML WebView Element use Qt::openUrlExternally for all 'new windows'?

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ayman
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fcrochik
      wrote on last edited by
      #2

      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

      Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved