Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. How to read QueryString params

How to read QueryString params

Scheduled Pinned Locked Moved Solved Qt for WebAssembly
3 Posts 2 Posters 534 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.
  • Q Offline
    Q Offline
    QtPai
    wrote on 9 Jul 2020, 22:11 last edited by
    #1

    I've been rather successful at setting up Qt for WebAssembly using QML. For the most part I have a working app using web sockets and dynamic gui objects.

    However I'm still struggling to pass parameters to the web app using the usual url's query string. This would be the equivalent, I guess, of reading the command line arguments of the stdin in regular desktop apps, but for the love of me I can't seem to figure out how to do this with wasm.

    Has anyone done this before or knows how to do it?

    Thanks!

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lorn.potter
      wrote on 9 Jul 2020, 23:31 last edited by
      #2

      You need this small patch:
      https://codereview.qt-project.org/c/qt/qtbase/+/248624

      You will not need to recompile, just patch the qtloader.js file in your apps build directory.

      Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
      Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

      1 Reply Last reply
      3
      • Q Offline
        Q Offline
        QtPai
        wrote on 22 Jul 2020, 11:09 last edited by
        #3

        Hi @lorn-potter . Sorry for my super late reply.

        Your message was spot on. Not only that but it helped me understand some stuff about wasm that I wasn't very clear about.

        I did some changes and I got my app up and running with no issues. This is awesome. I'm loving Qt more and more everyday.

        Thank you very much and warm regards!

        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