Skip to content

Qt for WebAssembly

Specific issues when using Qt for WebAssembly

454 Topics 1.8k Posts
  • Converting an Existing Project to a Web Application

    Unsolved
    9
    0 Votes
    9 Posts
    3k Views
    R
    @SimonSchroeder I have been using it internally and it works really well. I went with the single thread approach (without async) as that seems to be the most supported version and for an application that behaves like a website I don't really need threads anyway. There are some things that we need to be careful like not calling code that breaks the Qt event loop like qdialog.exec(). There are also some things that don't work as expected but that I found workarounds for and bug reports have been opened, so they will be fixed in the next versions. https://doc.qt.io/qt-6/wasm.html Is a good place to start reading. Version 6.5.2 seems to work decently well and it will be good to start. You can also check the betas to see how bugs are getting fixed (in case you run into some issue with 6.5.2).
  • An easier to start license for singular developers / really small companies

    Unsolved
    10
    1 Votes
    10 Posts
    967 Views
    R
    @JonB I am not a lawyer but from my understading of GPL3, if the website is public (used by other people outside of the organization that owns it) the source code (for the frontend) must be made available in case of a request. Otherwise you will need a comercial Qt license to keep it private (and I am not sure if the acquired license from the developer will fulfil this when the developer delivers the website to the customer and the project ends). Edit: Nevermind, I am most likely wrong here, according to here: https://www.qt.io/faq/tag/qt-commercial-licensing "Can I continue to distribute my application after my developer license has expired?" It should be ok if the project ends, and the customer should be able to continue the website without licensing issues, well at least as long they don't modify the source with Qt tools.
  • export files to be uploaded later?

    Unsolved
    3
    0 Votes
    3 Posts
    283 Views
    1
    @SGaist nevermind!.. i got the way, i needed to copy *.js, *.wasm and *.html to my public_html folder .. thats all. thanks anyway.
  • Using qmake subprojects with WebAssembly

    Unsolved
    1
    0 Votes
    1 Posts
    211 Views
    No one has replied
  • Keyboard modifier keys typed as is

    Unsolved
    2
    1 Votes
    2 Posts
    242 Views
    lorn.potterL
    I have started a bug report https://bugreports.qt.io/browse/QTBUG-116231 You can follow or comment there.
  • Error while parsing file Test.pro. Giving up

    Unsolved
    2
    0 Votes
    2 Posts
    491 Views
    C
    Finally getting around to digging some more into this, and it seems that the issue is tied to the multi-threaded kit. If I choose the single-threaded WebAssembly kit then everything works fine. Why would the "threadedness" make a difference?
  • Testing example minimal.pro fails with a fatal compile error

    Unsolved
    11
    0 Votes
    11 Posts
    909 Views
    L
    @SGaist Hi, I do remember that they did that split . The tools portion is fairly large by itself, but I am also tempted to look over the IDE as it has been some time. Overall, I am just a Hobby type of programmer & lately I have been playing around in Lua code ~for the dcs online flight sim's missions . I was impressed with the language itself :) Anyhow,not using the Atom IDE lately, so a quick switch to Visual Studio sounds like a plan. Maybe it will install a bunch of it onto the 2nd drive (a SSD) ! Qt 6.4 itself is looking pretty kewl, a lot more features than the last time I programmed in C++ .
  • How does qt draw QWidget in WebHtml?

    Unsolved
    2
    0 Votes
    2 Posts
    250 Views
    SGaistS
    Hi and welcome to devnet, If you want to know about the gory details, look at the wasm platform plugin in the qtbase sources.
  • Web app crashed with WebGL: CONTEXT_LOST_WEBGL error

    Solved
    4
    0 Votes
    4 Posts
    820 Views
    D
    @dacidi my problem solved using release with debug information instead of debug
  • 1 Votes
    3 Posts
    394 Views
    D
    @dacidi problem solved using release with debug information instead of debug
  • Not receiving keyboard inputs for TextField in Release mode

    Unsolved
    1
    0 Votes
    1 Posts
    187 Views
    No one has replied
  • main widget geometry width ...

    Unsolved
    3
    0 Votes
    3 Posts
    396 Views
    1
    @JonB i Will give a try to showEvent and comment Thanks!
  • Copy to clipboard or select text from canvas

    Solved
    8
    0 Votes
    8 Posts
    3k Views
    MesrineM
    @Mesrine I solved the chrome error by only copying the text to the clipboard. It seems that textEdit.copy(); try to copy images also to the clipboard and this still is not supported on some browsers. so I made my own class for text-only copy to clipboard class TextClipboard :public QObject { Q_OBJECT Q_PROPERTY(QString text MEMBER m_text NOTIFY textChanged) QML_ELEMENT public: TextClipboard(QObject *parent = nullptr):QObject(parent),m_text(QString()),clipboard(QGuiApplication::clipboard()) { } Q_INVOKABLE void copy()const { clipboard->setText(m_text); } signals: void textChanged(); public: QString m_text; QClipboard *clipboard; }; In the qml file where the text has to be copied on click on a Image I set TextClipboard { id:tclip text:root.address } Image { id:img anchors.centerIn:parent sourceSize.width: root.width-10 source: "image://qrcodeblack/"+root.address MouseArea { anchors.fill: img onClicked: { tclip.copy(); } } } And this solves the error
  • Application exit at start

    Solved
    2
    0 Votes
    2 Posts
    328 Views
    1
    Nevermind, this error shows when nullptr reference is being used.. thanks anyway.
  • qtContainerElements module property was not set or is invalid

    Unsolved
    1
    0 Votes
    1 Posts
    230 Views
    No one has replied
  • Qt Webassembly scale ratio

    Moved Solved
    3
    0 Votes
    3 Posts
    381 Views
    1
    @JasonWong probably that was the problem, Qt version.. i haven´t tested on 6.5.2, so i go through there.. thanks.
  • QQuickWidget in Webassembly causes other widgets to not be displayed

    Unsolved qquickwidget
    1
    1 Votes
    1 Posts
    192 Views
    No one has replied
  • XXX plugin not found when we create a native module for wasm.

    Unsolved
    2
    0 Votes
    2 Posts
    381 Views
    No one has replied
  • Qt 3D Application doesn't compile for Web Assembly

    Unsolved
    4
    0 Votes
    4 Posts
    570 Views
    GilboonetG
    @JasonWong Thank you, that's promising. Apparently it misses the meta to allow cross origin requests so I couldn't test it with another file, but it's nice to know that it is possible even if I'm unsure that I could code using OpenGL that is far beyond my skills.
  • QML DatePicker in Webassembly...?

    Solved
    2
    0 Votes
    2 Posts
    416 Views
    oria66O
    This was solved with DayOfWeekRow, MonthGrid, and related new components in Qt6.