Skip to content

Qt for WebAssembly

Specific issues when using Qt for WebAssembly

451 Topics 1.8k Posts
  • Links for Qt for WebAssembly

    Pinned Unsolved
    6
    7 Votes
    6 Posts
    3k Views
    S

    @tansgumus said in Links for Qt for WebAssembly:

    Fireofox 76.0 (64-bit)

    Fireofox 76.0 (64-bit) nooooooooooooooooooo this very bad

  • Simple WASM demo source

    Unsolved
    1
    0 Votes
    1 Posts
    61 Views
    No one has replied
  • 0 Votes
    4 Posts
    115 Views
    L

    @SGaist said in Qt 6.8.2 for wasm on android, the keyboard always auto popup ?:

    Can you share the bug report ?

    https://bugreports.qt.io/browse/QTBUG-134917
    https://bugreports.qt.io/browse/QTBUG-133781

  • Qt WebAssembly using QDialog bug

    Unsolved
    1
    0 Votes
    1 Posts
    51 Views
    No one has replied
  • How to decode QR Code on wasm ?

    Solved
    4
    0 Votes
    4 Posts
    193 Views
    D

    I can't figure out how to build a lib for qzxing so I can link it with my application. I've tried cmake and qmake and nothing out of the box works. How did you compile qzxing? I am using qt 6.8.2 on windows 11.

  • Get Request Webassemply

    Solved
    2
    0 Votes
    2 Posts
    73 Views
    piervalliP

    There are two fantistic api in c++

    #ifdef __EMSCRIPTEN__ #include <emscripten.h> // Required for calling JavaScript #endif #ifdef __EMSCRIPTEN__ // WebAssembly-specific code emscripten_run_script("console.log('Running in WebAssembly');"); #endif #ifdef __EMSCRIPTEN__ const char* url = emscripten_run_script_string("window.location.href"); qDebug() << "Current Page URL:" << url; #endif
  • 0 Votes
    3 Posts
    109 Views
    GilboonetG

    For WebAssembly you cannot use theme icons directly but must use the Qt Ressource System

  • 1 Votes
    3 Posts
    1k Views
    E

    This might be QTBUG-133781, which release are you using ?

  • Problem with loading WASM application on IGEL terminal

    Unsolved
    1
    0 Votes
    1 Posts
    93 Views
    No one has replied
  • Receiving QNetworkReply::ProtocolFailure to GET request

    Solved
    2
    0 Votes
    2 Posts
    164 Views
    L

    The solution to the problem is to add the header res.addHeader("Access-Control-Allow-Origin", "*"); to the HTTP server;

    hServer.route("/", QHttpServerRequest::Method::Get, []() { QString testAnswer = "TEST REPLY"; res.addHeader("Access-Control-Allow-Origin", "*"); // Added line QHttpServerResponse res(testAnswer, QHttpServerResponse::StatusCode::Ok); return res; });

    After adding this line, the browser forwarded the reply to my application.

  • How to Properly Exit a Qt WebAssembly Application?

    Unsolved
    1
    0 Votes
    1 Posts
    91 Views
    No one has replied
  • HttpsStatusCodeAttribute not working properly.

    Solved
    4
    0 Votes
    4 Posts
    283 Views
    L

    After some investigation, I don't believe the issue is related to the attribute method. The entire received reply is empty. There are no headers or body received by the application. The Wireshark capture shows that the entire message is properly sent out by my HTTP server and received by the browser, however, the application does not receive it.

    I checked if any error was reported by the reply and received an error QNetworkReply::ProtocolFailure (399). I believe the browser strips that information and does not propagate it further to the application. I tested this in Firefox and Chrome with the same results.

    As I mentioned in my original post, the communication works perfectly when compiled as a desktop application. The issue was only observed when compiled by WebAssembly.

    I will close this post and reopen a new one with a new question.

  • 0 Votes
    11 Posts
    473 Views
    GilboonetG

    @lorn-potter Thank you, I think the OP needs help from someone who already built a Wasm project with Multimedia as he didn't manage to have his project built, on the pinned discussion almost all links are dead or out of date which doesn't help much.

  • Wasm apparently doesn't handle keyboard shortcuts

    Unsolved
    10
    0 Votes
    10 Posts
    682 Views
    S

    I am having a similar issue too. In one of my views (mixed Qml and C++) I have a Node editor, where nodes can be added and connected. I used to handle the Keys.onPressed event and delete selected nodes and connection when Delete is pressed. This worked very well with Qt 6.6.1 in Webassembly (I use Linux). Now, when I switched to 6.8.1, Keys.onPressed event is never generated in Webassempbly (works well on desktop). My scene receives the active focus (I am logging onActiveFocusChanged) but not the keyboard events.

  • 0 Votes
    1 Posts
    179 Views
    No one has replied
  • Errors usiong QNetworkInterface class in WebAssembly

    Solved
    5
    0 Votes
    5 Posts
    270 Views
    L

    @Mesrine Thank you again for your quick reply.

    I was so focused on the UI portion, that I didn't read the Networking section of the documentation properly. I need to investigate an alternative way to share data between the utility and the Remote UI.

    Thanks again for your help.

  • certificate error while installing emscripten

    Unsolved
    4
    0 Votes
    4 Posts
    243 Views
    SGaistS

    Likely a glitch

    Since it's working now, please mark the thread as solved :-)

  • Build RESTful API client example for WASM

    Unsolved
    3
    0 Votes
    3 Posts
    320 Views
    R

    Strange, I know for a fact that QNetworkAccessManager works on wasm, so you may want to use that instead.

  • How to use multi thread for Qt webassembly ? (Qt6.8.1)

    Unsolved
    1
    0 Votes
    1 Posts
    123 Views
    No one has replied
  • Unable to input Chinese (Chinese characters) ?

    Solved
    23
    0 Votes
    23 Posts
    4k Views
    J

    Confirmed:Qt6.8.1, it's finally possible to input Chinese.
    Thanks for all.