Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Intercept requests in QtWebEngineView
Forum Updated to NodeBB v4.3 + New Features

Intercept requests in QtWebEngineView

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 537 Views
  • 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.
  • V Offline
    V Offline
    valeryz
    wrote on last edited by
    #1

    Hello,

    I was wondering if there is a way to intercept requests in WebView in qml. I currently have it implemented in qt + cpp with QWidget, but would prefer to move it to qml, as the rest of my application is there.
    Currently I am setting a url interceptor on my QWebEngineProfile like this:
    m_urlInterceptor = new UrlInterceptor(this);
    m_page = m_webView->page();
    m_profile = m_page->profile();
    m_profile->setRequestInterceptor(m_urlInterceptor);
    I do not see an option to set url interceptor on WebEngineProfile in the doc.
    I need to intercept the request in order to inject a custom header.

    Any help is greatly appreciated :)

    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