qtquick: Fix View::setVisible(false) always showing the window

Adds some tests for Window too.
This commit is contained in:
Sergio Martins
2022-06-26 01:23:26 +01:00
parent 820161ba29
commit 9aab0af1dc
12 changed files with 65 additions and 5 deletions

View File

@@ -172,8 +172,10 @@ void ViewWrapper_qtquick::setVisible(bool is)
{
if (isRootView()) {
if (QWindow *w = m_item->window()) {
if (!w->isVisible()) {
if (is && !w->isVisible()) {
w->show();
} else if (!is && w->isVisible()) {
w->hide();
}
}
}