Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.2
-
None
-
firefox, chrome,
-
-
fefb1e18b (dev), 4c562f94c (6.5), 7549f7fdb (6.6)
Description
Hi,
According to: https://doc.qt.io/qt-6/wasm.html#application-startup-and-the-event-loop
Particulary this sentence: "Application code then omits making the exec() call, and can shut down Qt cleanly by deleting the top-level window and application objects."
We can have an application with a async main function and then, when the main window is closed, we delete all application objects and the application should exit fine
I cannot make it to work completly fine with the linked code.
The app is simple:
- have a main class, subclassing QGuiApplication, creating the QQmlApplicationEngine, loading the qml module
- have a signal in qml when the button is pushed
- c++ should delete the qml root object
- when informed of qml root object deletion, require to delete the main class, thus, cleaning all remaining objects
The application do exit, but with an error, on firefox:
And on chrome: