Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

WebAssembly Menu Action Hangs



  • Hello,
    I take my first steps in WebAssembly. So, I write my own 'Hello world'. Naturally, I encounter a first difficulty !
    It's a small application written with qtcreator : two buttons, one label, one menu action. Button clicks or Menu actions set new text on the label. All events runs perfectly when compiled for desktop. When compiled for WebAssembly, buttons event runs but the first action on the menu refreshes the label and then stops (bug) all the application.
    Configuration : emsdk 1.38.30, Qt 5.13.0 freshly compiled, last Chromium(#enable-webassembly-threads), last Firefox (javascript.options.shared_memory), Mint 18.04
    http://pierre.hericourt.free.fr/HelloGoodbye//HelloGoodbye.html
    Many thanks
    Regards
    Pierre



  • Hello,
    I wrote the simplest code : just a menu. A long as I play with the menu, the code runs but if i click elsewhere it hangs (no message in the console) and no more menu playing possible :(
    http://pierre.hericourt.free.fr/Menu/Menu.html

    #include <QApplication>
    #include <QMainWindow>
    #include <QWidget>
    #include <QMenu>
    #include <QMenuBar>
    #include <QAction>
    
    int main(int argc, char *argv[]) {
    
        QApplication app(argc, argv);
        QMainWindow *window = new QMainWindow;
        QMenuBar *menu = new QMenuBar(window);
        QMenu *file = new QMenu("&File");
        QAction *action = file->addAction("&Say");
        menu->addMenu(file);
        window->resize(250, 150);
        window->setWindowTitle("Menu");
        window->show();
        return app.exec();
    }
    

    I'm going to reinstall all the tools and try to get some error messages ...
    Hope, I'll return here with a minimal but functional sample !
    Regards
    Pierre



  • Hi,
    I tried the Nodepad (Examples/Qt-5.13.0/widgets/tutorials/notepad) ... Same issue with MenuBar but Toolbar is ok ...
    So, it's not my obvious code ... Perharps a bad install ?
    Pierre


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You also may have found a bug. Did you check the bug report system ?



  • Hi !
    indeed : it's a reported bug (QTBUG-74868) !
    I'm really a noob, I didn't think about looking in the bug report system.
    So sorry and ... many thanks !
    Regards
    Pierre


Log in to reply