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. add header to WebView requests
Forum Updated to NodeBB v4.3 + New Features

add header to WebView requests

Scheduled Pinned Locked Moved Solved Qt WebKit
5 Posts 2 Posters 2.1k 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.
  • i.n.g.o.I Offline
    i.n.g.o.I Offline
    i.n.g.o.
    wrote on last edited by
    #1

    Hi.

    i need to set a header to each WebView request.

    i was searching the forum, but did not find a solution for this.

    setting a QQmlNetworkAccessManagerFactory does not work, the QQmlNetworkAccessManagerFactory::create function is never called. seems like WebView does not use QNetworkAccessManager?

    is this possible at all?

    thanks for any hints.

    raven-worxR 1 Reply Last reply
    0
    • i.n.g.o.I i.n.g.o.

      Hi.

      i need to set a header to each WebView request.

      i was searching the forum, but did not find a solution for this.

      setting a QQmlNetworkAccessManagerFactory does not work, the QQmlNetworkAccessManagerFactory::create function is never called. seems like WebView does not use QNetworkAccessManager?

      is this possible at all?

      thanks for any hints.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @i.n.g.o. said in add header to WebView requests:

      seems like WebView does not use QNetworkAccessManager?

      on what platform are you on?
      Anyway your changes are low from within QML.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • i.n.g.o.I Offline
        i.n.g.o.I Offline
        i.n.g.o.
        wrote on last edited by
        #3

        i need it to run on android and ios.

        but also on desktop macos it is the same.
        i am trying with Qt 5.12.2 right now.

        raven-worxR 1 Reply Last reply
        0
        • i.n.g.o.I i.n.g.o.

          i need it to run on android and ios.

          but also on desktop macos it is the same.
          i am trying with Qt 5.12.2 right now.

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by raven-worx
          #4

          @i.n.g.o. said in add header to WebView requests:

          i am trying with Qt 5.12.2 right now.

          on mobile platforms the native webview is displayed (over the QML content). No chance to intercept the requests, for security reasons.
          As i said, QML is not involved and QQmlNetworkAccessManagerFactory is used for loading QML resources.

          Your only chance would be on Desktop to use QWebEngineHttpRequest

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          Q 1 Reply Last reply
          0
          • i.n.g.o.I Offline
            i.n.g.o.I Offline
            i.n.g.o.
            wrote on last edited by
            #5

            thank you for the explanation.

            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