This looks like a bug. I see a dead lock in debugger: v8::internal::RuntimeProfiler::WaitForSomeIsolateToEnterJS
and QQmlDataLoader::shutdownThread
wait for each other. I can't find a good workaround for this issue.
I found a dirty hack that solved the issue. If container
is deleted a bit earlier, all works ok:
void MainWindow::closeEvent(QCloseEvent *e) {
QMainWindow::closeEvent(e);
if (e->isAccepted() && centralWidget()) {
delete centralWidget();
}
}
You probably should send a bug report. Note that m_mainWindow
is not needed to reproduce the issue. Using container->show();
gives the same result.