Skip to content

Qt for WebAssembly

Specific issues when using Qt for WebAssembly

437 Topics 1.7k Posts
  • Missing QtQuick.Controls.Styles in WebAssembly

    Solved
    2
    0 Votes
    2 Posts
    754 Views
    D

    I found a solution for this problem.

    The import in the QML file has to look like:

    import QtQuick 2.0 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4

    My mistake was to import the QtQuick.Controls 2.x

    I also had to delete the build folder and build it from scratch.

  • blank web page

    Unsolved
    1
    0 Votes
    1 Posts
    273 Views
    No one has replied
  • Test if WebAssembly in C++ code

    Solved
    4
    1 Votes
    4 Posts
    813 Views
    SGaistS

    Hi,

    Even simpler use Qt's OS defines: Q_OS_WASM:

    #ifdef Q_OS_WASM // You WASM specific code #endif
  • Help me

    Unsolved
    2
    0 Votes
    2 Posts
    333 Views
    lorn.potterL

    QtMqtt will not work out of the box with WebAssembly, you do need to use a WebSocket IODevice, and use an MQTT broker that supports websocket connections.

    https://qtandeverything.blogspot.com/2019/08/qmqtt-qwebassembly.html

  • Qt3DRenderer::QCamera Alternative

    Unsolved
    7
    0 Votes
    7 Posts
    707 Views
    lorn.potterL

    Qt3D is not supported in Qt WebAssembly, so no work has been done to make it work. Qt3D requires OpenGL (desktop) and WebAssembly only supports OpenGL ES2/3, so I doubt it would even build correctly.

  • Toolbar background

    Unsolved
    1
    0 Votes
    1 Posts
    192 Views
    No one has replied
  • Tooltips

    Unsolved
    1
    0 Votes
    1 Posts
    225 Views
    No one has replied
  • QMessageBox sizing

    Unsolved
    5
    0 Votes
    5 Posts
    579 Views
    lorn.potterL

    Sadly, this is a known bug.

    I thought there was already a bug report about it, but I could not find one, so I started a new one:

    https://bugreports.qt.io/browse/QTBUG-83503

  • QHttpMultipart

    Solved
    3
    0 Votes
    3 Posts
    361 Views
    W

    Thanks, I have applied the patches to 5.14.2 and my test app compiles now.

  • Install old emscripten version. How?

    Unsolved
    2
    0 Votes
    2 Posts
    586 Views
    lorn.potterL

    The wiki has updated instructions for the new emscripten labels:
    https://wiki.qt.io/Qt_for_WebAssembly
    ./emsdk install sdk-fastcomp-1.38.27-64bit
    ./emsdk activate sdk-fastcomp-1.38.27-64bit

  • Access file system...?

    Solved
    2
    0 Votes
    2 Posts
    627 Views
    oria66O

    Ok, I found the solution. Thanks to:
    https://stackoverflow.com/questions/56886410/access-local-user-file-on-qt-for-web-assembly

    So, with the help of:

    https://doc.qt.io/qt-5/qfiledialog.html#getOpenFileContent

  • Application exit (TypeError: eventHandler.target is null)

    Solved
    8
    0 Votes
    8 Posts
    794 Views
    W

    Both I'd say but more the fact that its new as once you have the build out of the way then that part falls away. Just starting out with it though so maybe the second one is not that big an issue.

  • Build and run simple QML on Webassembly

    Solved
    7
    0 Votes
    7 Posts
    863 Views
    AlsaniePssA

    @lorn-potter It's working... Woohoo, thanks! Now it builds. I just built simple QML :)

  • Building Qt (source) for Webassembly fail

    Solved
    8
    0 Votes
    8 Posts
    703 Views
    Pablo J. RoginaP

    @AlsaniePss please try right clicking the 3 vertical dots at the right of the post...

  • CUPS for WebAssembly

    Unsolved
    2
    0 Votes
    2 Posts
    421 Views
    lorn.potterL

    @wild-linkle said in CUPS for WebAssembly:

    getpwnam

    Wasm lives in the same sandbox as javascript. Accessing printers and other hardware is not supported at this time.

  • Qt and Angular

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    H

    There is a library called QtWebApp which allows you to set up a server and it is pretty good for small-medium projects. t has examples and a great tutorial on the official site there.

    I don't really know how Angular works and I've never tried it so tell me if this is what you needed or not.

  • error: undefined symbol ... during make

    Unsolved
    23
    0 Votes
    23 Posts
    3k Views
    lorn.potterL

    Emscripten/wasm does not have access to the kernel, so trying to build kernel modules for wasm will not work. It lives in the web browser sandbox alongside javascript.

  • how to edit the Qlistwidget item on the contextmenu

    Unsolved
    2
    0 Votes
    2 Posts
    304 Views
    jsulmJ

    @Triomphe Please explain clearly what you want to do. In what way do you want to "edit the Qlistwidget item"?

  • Installation of Webassembly (Debian Linux)

    Solved
    7
    0 Votes
    7 Posts
    856 Views
    E

    @sierdzio
    That is indeed the issue. I went to the wrong directory choosing the opensource version (with the old installer etc. ...).
    I'm donwloading and can even download Webassembly.

    Thanks for your help!!!

  • (need help) to make my first app with WebAssembly

    Unsolved
    3
    0 Votes
    3 Posts
    470 Views
    O

    Hello, I am having the same issue.

    Did you manage to solve it ?
    Thank you