Skip to content

Commit

Permalink
Set PopupView as parent of PopupWindow_QQuickView
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbjeukendrup committed Apr 29, 2024
1 parent 1c45f48 commit 09200b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/framework/uicomponents/view/popupview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 09200b3

Please sign in to comment.