• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Setting headers in QML app

Scheduled Pinned Locked Moved App Development
5 Posts 2 Posters 428 Views 1 Watching
Loading More Posts
  • 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.
    • G Offline
      geekvine
      last edited by 5 May 2020, 07:40

      Hey folks,

      I'm working on a pure QML app and am looking to set a header before the page loads (Access-Control-Allow-Origin in fact). Having a tough time finding an answer through the QT docs, so does anyone have a working example of doing this (if it's possible even). Thanks!

      1 Reply Last reply Reply Quote 0
      • L Offline
        lduboeuf
        last edited by lduboeuf 5 May 2020, 10:34 5 May 2020, 10:32

        maybe you should rename the topic differently as an header is more a visual component at the top of the screen when talking QML.
        You would like more to modify the HTTP header of a XMLhttpRequest or you're working with Morph.Web, or you're trying to load a remote QML component ?

        G 1 Reply Last reply 5 May 2020, 11:30 Reply Quote 1
        • G Offline
          geekvine @lduboeuf
          last edited by 5 May 2020, 11:30

          @lduboeuf using webview yes. And youre right the topic isnt specifix enough.

          L 1 Reply Last reply 5 May 2020, 12:35 Reply Quote 1
          • L Offline
            lduboeuf @geekvine
            last edited by lduboeuf 5 May 2020, 12:37 5 May 2020, 12:35

            @geekvine i'm afraid it is not doable with QML only, you need to do it in c++
            But as i remember Access-Control-Allow-Origin is something done server side ?

            G 1 Reply Last reply 5 May 2020, 13:42 Reply Quote 0
            • G Offline
              geekvine @lduboeuf
              last edited by 5 May 2020, 13:42

              @lduboeuf you are correct...there is some basic C++ docs on how to do this so if it's not possible in QML i might have to do that as a workaround.

              1 Reply Last reply Reply Quote 0
              4 out of 5
              • First post
                4/5
                Last post