diff --git a/tooltipmanager.cpp b/tooltipmanager.cpp index 102338d02..01820ce06 100644 --- a/tooltipmanager.cpp +++ b/tooltipmanager.cpp @@ -308,8 +308,8 @@ void ToolTipManagerPrivate::showToolTip() bool ToolTipManager::eventFilter(QObject *watched, QEvent *event) { QGraphicsWidget * widget = dynamic_cast(watched); - if (!widget) { - return QObject::eventFilter(watched,event); + if (!widget) { + return QObject::eventFilter(watched, event); } switch (event->type()) { @@ -320,6 +320,13 @@ bool ToolTipManager::eventFilter(QObject *watched, QEvent *event) break; } + // Don't restart the show timer on a mouse move event if there hasn't + // been an enter event or the current widget has been cleared by a click + // or wheel event. + if (!d->currentWidget) { + break; + } + case QEvent::GraphicsSceneHoverEnter: { // Check that there is a tooltip to show