Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Detect custom URL scheme
Forum Updated to NodeBB v4.3 + New Features

Detect custom URL scheme

Scheduled Pinned Locked Moved Qt WebKit
3 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.
  • R Offline
    R Offline
    rschick
    wrote on last edited by
    #1

    Is there any way to detect when a QWebView tries to load a custom URL scheme? For example, if the web view loads a page that has the following [removed]

    @[removed].href = "myapp://actionurl?action=login";@

    Is there any way to receive a signal when this code is run?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rschick
      wrote on last edited by
      #2

      First removed should say "javascript". Second should say "window".

      1 Reply Last reply
      0
      • K Offline
        K Offline
        KuhTee
        wrote on last edited by
        #3

        Maybe the signal QWebPage::unsupportedContent ( QNetworkReply * reply ) ?

        Otherwise you could overload bool QWebPageacceptNavigationRequest ( QWebFrame * frame, const QNetworkRequest & request, NavigationType type ) and check the URL before the request is sent.

        Depends what you want to do and what myapp:// exactly is.

        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