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

WASM event loop: running as a QCoreApplication without any canvas

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.2
    • 5.14
    • Core: Event loop
    • None
    • WebAssembly

    Description

      Hello,

      I am having trouble making the WASM event loop running with only a QCoreApplication (works fine with a QGuiApplication).

      If I understand correctly QWasmEventDispatcher::processEvents, the event loop depends on the refresh rate of the canvas on which the app is shown, since emscripten_set_main_loop_arg is called with 0 fps.

      But if there is no canvas and I just want to have the Qt event loop running periodically, say once every 100 millisecond (or even manually through custom calls to qApp->processEvents() in the JS realm) how am I supposed to handle it ? Currently this blocks the whole web page and makes the browser issue performance warnings (in the case of firefox) or entirely stuck (in the case of chrome).

      Thanks

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-77796
          # Subject Branch Project Status CR V

          Activity

            People

              lpotter Lorn Potter
              jcelerier Jean-Michaƫl Celerier
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change