summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorQiang Li <liqianga@uniontech.com>2020-12-03 10:17:14 +0800
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-01-15 12:26:41 +0100
commit3f3d5e6716d9130776b3613ccbd5595de7d4af8d (patch)
tree373add23492d86b9204642e37d3d7a099de7bfcf /src/widgets/widgets/qmenu.cpp
parentbaff03d3d4f02a19b6b9a0070a5b8196b4df101d (diff)
Fix the tips still show when cursor move to another action
In this case, the previous action's tip is still displayed when the cursor moves from one action with tip to another action without tip. Fixes: QTBUG-89082 Pick-to: 5.15 Pick-to: 6.0 Change-Id: I0a00595dc3d716725678487be9cbb363c4d3b392 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
-rw-r--r--src/widgets/widgets/qmenu.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 1fb967ef8d..d704aac525 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -3068,6 +3068,8 @@ QMenu::event(QEvent *e)
const QString toolTip = action->d_func()->tooltip;
if (!toolTip.isEmpty())
QToolTip::showText(ev->globalPos(), toolTip, this);
+ else
+ QToolTip::hideText();
return true;
}
}