aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktooltip.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2020-02-15 10:19:38 +0100
committerLiang Qi <liang.qi@qt.io>2020-02-15 10:19:38 +0100
commitc9260cd940fe9ca0e440b715cbfc13dd046e07b0 (patch)
tree9e4a97453f79dc7cf25434785e72920172535afd /src/quicktemplates2/qquicktooltip.cpp
parent8f9f0508e4f3469ae56874fcecc89023b51c2a75 (diff)
parent025f938c1b4676782674d54375e1e4e560e4b6cd (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: .qmake.conf tests/auto/qquickpopup/tst_qquickpopup.cpp Change-Id: Id3bca2da290234f3c69845ffe18c6d9193a1bd28
Diffstat (limited to 'src/quicktemplates2/qquicktooltip.cpp')
-rw-r--r--src/quicktemplates2/qquicktooltip.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquicktooltip.cpp b/src/quicktemplates2/qquicktooltip.cpp
index 9ea0160e..9d733c94 100644
--- a/src/quicktemplates2/qquicktooltip.cpp
+++ b/src/quicktemplates2/qquicktooltip.cpp
@@ -557,8 +557,9 @@ void QQuickToolTipAttached::hide()
QQuickToolTip *tip = d->instance(false);
if (!tip)
return;
-
- tip->close();
+ // check the parent item to prevent unexpectedly closing tooltip by new created invisible tooltip
+ if (parent() == tip->parentItem())
+ tip->close();
}
QT_END_NAMESPACE