From 09200b3cc1d3f8e6b930b9616284f912a22f76f2 Mon Sep 17 00:00:00 2001 From: Casper Jeukendrup <48658420+cbjeukendrup@users.noreply.github.com> Date: Sat, 27 Apr 2024 22:38:40 +0200 Subject: [PATCH] Set PopupView as parent of PopupWindow_QQuickView This is to ensure that the PopupWindow_QQuickView is deleted when the corresponding PopupView is deleted. Otherwise, you might end up in the situation that the PopupView has already been deleted (for example, because it was unloaded by a loader) but the PopupWindow_QQuickView is still alive and still visible, and thus stuck on the screen forever. --- src/framework/uicomponents/view/popupview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/uicomponents/view/popupview.cpp b/src/framework/uicomponents/view/popupview.cpp index decdfabd0097..4650910da302 100644 --- a/src/framework/uicomponents/view/popupview.cpp +++ b/src/framework/uicomponents/view/popupview.cpp @@ -131,7 +131,7 @@ void PopupView::init() return; } - m_window = new PopupWindow_QQuickView(); + m_window = new PopupWindow_QQuickView(this); m_window->init(engine, isDialog(), frameless()); m_window->setOnHidden([this]() { onHidden(); }); m_window->setContent(m_component, m_contentItem);