From 3f3d5e6716d9130776b3613ccbd5595de7d4af8d Mon Sep 17 00:00:00 2001 From: Qiang Li Date: Thu, 3 Dec 2020 10:17:14 +0800 Subject: 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 --- src/widgets/widgets/qmenu.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/widgets/widgets/qmenu.cpp') 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; } } -- cgit v1.2.3