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 777 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

        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 Offline
          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 Offline
            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 Offline
              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 Offline
                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

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post