Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94153

QToolButton::setMenu WebAssembly support (nested event loop)

    XMLWordPrintable

Details

    • WebAssembly

    Description

      I added a QToolButton to my form and in code called setMenu:

        auto filterMenu = new QMenu(ui->filterButton);
        ui->filterButton->setMenu(filterMenu);
        
        // Add actions to menu
        ...
      

      Then I compiled it for webassembly, opened the browser and clicked on the tool button. The menu opens but the browser prints to console an ugly error message:

      Seems the QToolButton menu internally calls exec() but Qt for WebAssembly does not support nested event loops.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            karmo Karmo Kuurberg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes