Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. How to intercept Ctrl + Click on external links
Forum Updated to NodeBB v4.3 + New Features

How to intercept Ctrl + Click on external links

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 237 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.
  • J Offline
    J Offline
    jetownfeve21
    wrote on last edited by
    #1

    Hi, I'm currently working on an web-browser-like app that work with our own file format (.zim) and scheme. When the URL's scheme is our own we open it in our app, otherwise in the default user's web browser like Firefox or Chrome. We implemented the possibility to open a link in a new tab with the Ctrl+Click command thanks to the QWebEngineView::createWindow(QWebEnginePage::WebWindowType type) method where if the type is QWebEnginePage::WebBrowserBackgroundTab or QWebEnginePage::WebBrowserTab we create a new tab in our app. The problem is if we Ctrl+Click on an external link, it opens a new empty tab in our app and on the default user's web browser too. Do you know where I can intercept the request to know simultaneously if it's an external link and if it's a Ctrl+Click event ?

    1 Reply Last reply
    1

    • Login

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