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

    Setting headers in QML app

    App Development
    2
    5
    229
    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
      geekvine
      last edited by

      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
      • lduboeufL
        lduboeuf
        last edited by lduboeuf

        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 Reply Quote 1
        • G
          geekvine @lduboeuf
          last edited by

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

          lduboeufL 1 Reply Last reply Reply Quote 1
          • lduboeufL
            lduboeuf @geekvine
            last edited by lduboeuf

            @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 Reply Quote 0
            • G
              geekvine @lduboeuf
              last edited by

              @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
              • First post
                Last post