Skip to content

Qt for WebAssembly

Specific issues when using Qt for WebAssembly

454 Topics 1.8k Posts
  • ColorDialog QML in WASM not working

    Unsolved
    1
    0 Votes
    1 Posts
    214 Views
    No one has replied
  • Linux TextInput

    Unsolved
    3
    0 Votes
    3 Posts
    330 Views
    monettesM
    @lorn-potter I'm using 6.4.2
  • Qt WebAssembly and SEO

    Unsolved
    3
    0 Votes
    3 Posts
    509 Views
    K
    @lorn-potter thank yoy
  • QT for WebAssembly in Production

    Unsolved
    3
    0 Votes
    3 Posts
    379 Views
    lorn.potterL
    https://qmlonline.kde.org/ https://qt-webassembly.io/designviewer/ an example of the Slate desktop app ported to WebAssembly: https://www.qt.io/web-assembly-example-slate
  • Enable multithreading in CMake

    Solved
    16
    0 Votes
    16 Posts
    4k Views
    I
    @jsulm ok... i'll have a try.
  • Transparent Background

    Unsolved
    1
    0 Votes
    1 Posts
    215 Views
    No one has replied
  • Trouble getting started with WebAssembly + QtWidgets (c++, Windows)

    Unsolved
    2
    0 Votes
    2 Posts
    396 Views
    lorn.potterL
    You need to install ninja and use that to build. MSVC compiler and Emscripten don't mix well.
  • Shutdown of QT application in Web Assembly

    Unsolved
    3
    0 Votes
    3 Posts
    379 Views
    G
    Thank you very much for taking the time to reply. Gary
  • Qt for WebAssembly MultiPointTouchArea loses all touchpoints after just one is released

    Unsolved
    2
    0 Votes
    2 Posts
    356 Views
    lorn.potterL
    Indeed it does. This is a bug, I will report it for you. https://bugreports.qt.io/browse/QTBUG-110941
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • WebAssemby project - bild error

    Unsolved
    9
    1 Votes
    9 Posts
    1k Views
    M
    When I removed all the code and left only a declaration of the QWebSocket type variable in the code, I got the following error. I am including <QtWebSockets/QWebSocket> and added websockets to my qmake. I added -lwebsocket.js to make arguments in the creator as well. The -lwebsocket.js seems to be the problem. I tried to build a minimal project w/ WebSocket outside Qt, using the emscripten API and I received a similar error when I did not include -lwebsocket.js into the build command. Apparently, when using Qt creator the compiler is not receiving the argument, regardless of where I'll put it. I tried adding it to the .pro file in several ways as well (using: QMAKE_LFLAGS, QMAKE_CXXFLAGS, LIBS, CONFIG) error: undefined symbol: _ZN10QWebSocketC1ERK7QStringN18QWebSocketProtocol7VersionEP7QObject (referenced by top-level compiled C/C++ code) warning: Link with -sLLD_REPORT_UNDEFINED to get more information on undefined symbols warning: To disable errors for undefined symbols use -sERROR_ON_UNDEFINED_SYMBOLS=0 warning: __ZN10QWebSocketC1ERK7QStringN18QWebSocketProtocol7VersionEP7QObject may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: _ZN10QWebSocketD1Ev (referenced by top-level compiled C/C++ code) warning: __ZN10QWebSocketD1Ev may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library Error: Aborting compilation due to previous errors em++: error: ' /emsdk/node/14.18.2_64bit/bin/node /emsdk/upstream/emscripten/src/compiler.js /var/folders/qn/gzn_l03x2ds1cdh94cysrhfw0000gq/T/tmp4su37te2.json'
  • Static build qml module depends _qmlcache _resources_2 _resources_1 targets

    Solved
    4
    0 Votes
    4 Posts
    508 Views
    MesrineM
    It seems i need to add to qt_add_qml_module the [OUTPUT_TARGETS out_targets_var] and export the additional targets in out_targets_var variable . If the backing target is a static library and that static library will be installed, OUTPUT_TARGETS should be given to provide a variable in which to store a list of additional targets that will also need to be installed. These additional targets are generated internally by qt_add_qml_module() and are referenced by the backing target's linking requirements as part of ensuring that resources are set up and loaded correctly.
  • Building your wasm app with a custom HTML page

    Solved
    3
    0 Votes
    3 Posts
    950 Views
    A
    ok. cool. thanks :)
  • Importing a C++ types declared using the QML_ELEMENT return module is not installed

    Unsolved
    1
    0 Votes
    1 Posts
    435 Views
    No one has replied
  • 0 Votes
    3 Posts
    845 Views
    Y
    Success! Works with Qt6.4.1 and Emscripten 3.1.14 (was trying later versions of both which was giving above error)
  • Need help resolving undefined symbols at compile time

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    lorn.potterL
    For Qt 6.3.0 you need Emscripten 3.0.0. Is that what you have installed? Those errors look like something that happens when a mis-match of Emscripten versions are used, where Qt uses one version and a developer uses a different one.
  • Duplicate symbol: blake2b when linking with libsodium

    Unsolved wasm link error libsodium static
    2
    0 Votes
    2 Posts
    650 Views
    MesrineM
    I noticed that ed25519 do not need blake2b. A temporal solution was to remove the object "libsodium_la-blake2b-ref.o" from libsodium.a by using ar dv libsodium.a libsodium_la-blake2b-ref.o I can not remove "qcryptographichash.cpp.o" from libQt6Core.a because I use that on other libraries.
  • 0 Votes
    5 Posts
    3k Views
    M
    @lorn-potter I figured out how to export custom functions, but there's still a problem with exporting the runtime ones. I am adding the -s EXPORTED_RUNTIME_METHODS=UTF8ToString argument and keep receiving "Uncaught RuntimeError: Aborted('UTF8ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ))" error.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Qt 6.4.0 WebAssembly QToolButton popup menu freezes

    Unsolved
    3
    0 Votes
    3 Posts
    604 Views
    F
    Thanks Karmo! Guess I have to do similar thing.