Skip to content

Qt for WebAssembly

Specific issues when using Qt for WebAssembly

454 Topics 1.8k Posts
  • Qt 6.8.0 seems to have memory issues

    Unsolved
    4
    0 Votes
    4 Posts
    567 Views
    L
    I have tried enabling asynchronous, increasing initialization memory, and adjusting the maximum memory, but all have no effect. It is random and the browser console cannot capture useful errors. Sometimes it is memory access out of bounds at .wasm.QQuickDeliveryAgentPrivate:: Sometimes isUncaught RuntimeError: null function or function signature mismatch at .wasm.QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) It is also possible that there is only uncaught
  • How to add pictures to webassembly application?

    Unsolved
    8
    0 Votes
    8 Posts
    786 Views
    lorn.potterL
    Qt/Quick does not know how to handle Blob resources. You can either use a normal url, or pack in in a Qt resource file.
  • how can i use library osg in webAssembly?

    Unsolved
    4
    0 Votes
    4 Posts
    445 Views
    lorn.potterL
    @alihitman99 What is the error message?
  • Error building under webassembly

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    Anton1978A
    Amazing. Thank you very much, this really works. True, I didn’t understand where in your link to look at the correspondence between the versions of emscripten and Qt, but if you build using version emscripten 3.1.50 with Qt 6.7, then everything works fine. This is the first webassembly application in my life ;-)
  • Can somebody help me with emcmake error finding FindQt5.cmake

    Unsolved
    4
    0 Votes
    4 Posts
    668 Views
    Q
    @VRonin what if got only qtpaths.js? If you mean run /home/oleksiy/Qt/5.15.2/wasm_32/bin/qtpaths.js i've got this error RuntimeError: abort(RuntimeError: abort(RuntimeError: abort(Error: ENOENT: no such file or directory, open '/home/oleksiy/Qt/5.15.2/wasm_32/bin/qtpaths.wasm'). Build with -s ASSERTIONS=1 for more info.). Build with -s ASSERTIONS=1 for more info.). Build with -s ASSERTIONS=1 for more info. at process.abort (/home/oleksiy/Qt/5.15.2/wasm_32/bin/qtpaths.js:1:17201) at process.emit (events.js:314:20) at processPromiseRejections (internal/process/promises.js:209:33) at processTicksAndRejections (internal/process/task_queues.js:98:32) P.s. i tried to fix build using chatgtpt and he give me this recommendations?
  • Problem with QCalendarWidget

    Solved
    3
    1 Votes
    3 Posts
    400 Views
    A
    adding this "QMAKE_LFLAGS += -sASYNCIFY -Os" in pro file solve problem, thanks!
  • QtLocation and QtPositioning not installed

    Unsolved
    12
    0 Votes
    12 Posts
    2k Views
    D
    @Mesrine thanks for sharing! Awesome work there! At this time I am more inclined to a single C++ codebase for a proof of concept which would target Web, Desktop and Mobile. However if it comes to it, I could end up with a separate solution for WASM inspired by what you have there.
  • How can WebAssebly send a HTTP POST request with Referer header?

    Unsolved
    1
    0 Votes
    1 Posts
    239 Views
    No one has replied
  • wasm and QTableWidget

    Unsolved
    2
    0 Votes
    2 Posts
    278 Views
    E
    I had the constructor of the QWidget sub class inside a lambda construct and was not able to make it work. Now I call a function of the owner class from the lambda and everything works fine. old code: connect(m_database, &WsDatabase::devicesCollected, this, [&](QJsonArray data){ disconnect(m_database, &WsDatabase::devicesCollected, this, nullptr); for(const QJsonValue &value : data) { DeviceWidget *widget = new DeviceWidget(m_user, this); ui->deviceTable->setCellWidget(row, column, widget); column++; if (column == 3) { row++; column = 0; } } }); m_database->getData( "select * from devices", m_user.userRole == WsServ::UserRoles::SuperAdmin ? "" : QString(" id_usergroup = %1").arg(m_idSelectedUserGroup), WsServ::Devices ); new code: connect(m_database, &WsDatabase::devicesCollected, this, [this](QJsonArray data){ disconnect(m_database, &WsDatabase::devicesCollected, this, nullptr); deviceEntryReady(data); }); A sample app from scratch didn't had the problem.
  • How make qt for wasm generate source map file using CMake?

    Unsolved
    3
    0 Votes
    3 Posts
    461 Views
    S
    @Paul-Colby Thanks! It works, but it's still unable to debug the c++ code in the browser's devetools console, it seems the source map file does not work correctly for .wasm, all variables still stays in a format like var0, var1,...😂 C/C++ DevTools Support extension not works too
  • 0 Votes
    5 Posts
    928 Views
    E
    found one point in firefox, you have to accept a self signed certificate for the 443 port (https) and for the port of your websocket request (may be 1234). call your adress https://192.168.1.1 to load the wasm app and then call https:192.168.1.1:1234 for your connection to the websocket server and accept the certificate
  • setting up the project to use emcsripten kit

    Unsolved
    1
    0 Votes
    1 Posts
    173 Views
    No one has replied
  • 1 Votes
    6 Posts
    762 Views
    JasonWongJ
    @RandomGuy This is a good solution
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    145 Views
  • System Default keyboard hides QLineEdit / Emoji Picker Issue

    Unsolved
    6
    0 Votes
    6 Posts
    548 Views
    S
    Okay I will try it out. Thanks
  • WebAssembly create and download pdf and xlsx files

    Unsolved thanks
    3
    0 Votes
    3 Posts
    581 Views
    M
    Exporting directly to PDF or Excel in a web browser is tricky due to security concerns. Here are some workarounds: Client-side libraries (limited): These libraries create a file-like representation of your table, but it might not be a perfect PDF or Excel. Users would need to save it manually. Server-side generation (better): Send your table data to your server. The server creates a real PDF/Excel file and sends it back for download. This offers more control and lets users directly download the file. Third-party services (alternative): These services convert your data to PDF/Excel in the cloud. You might need extra setup and potentially pay fees depending on the service. The best option depends on your needs (security, complexity, file format). Let me know if you want to explore a specific solution further!
  • Qt 6.8.0 Beta2 wasm-ld: error: unable to find library -lQmlModels

    Unsolved
    4
    0 Votes
    4 Posts
    672 Views
    JasonWongJ
    Okay, I have submitted the bug here: https://bugreports.qt.io/browse/QTBUG-127425
  • Viewport issues, (0|0) outside of the frame

    Solved
    2
    0 Votes
    2 Posts
    319 Views
    J.HilkJ
    I'm a f*ing moron, never mind. //old y:smallestSide - height ... //"fix" y:Math.max(smallestSide - height,0)
  • emscripten_set_mousedown_callback does not call the callback function

    Unsolved
    6
    0 Votes
    6 Posts
    508 Views
    8Observer88
    The Emscripten issue: emscripten_set_mousedown_callback does not call the callback function from Qt Creator
  • emscripten_request_pointerlock() returns EMSCRIPTEN_RESULT_UNKNOWN_TARGET

    Solved
    5
    0 Votes
    5 Posts
    471 Views
    8Observer88
    The bug report was closed because You need to handle this in a javascript mouse event and not a Qt mouse event. I will continue here: https://forum.qt.io/topic/157373/emscripten_set_mousedown_callback-does-not-call-the-callback-function