QToolTip: don’t close again on Close event
Prevent recursion: hideTipImmediately() calls QWidget::close(), which will soon start calling QWindow::close(), which will send another close event. Fix this by calling hideTipImmediately() only for Close events not targeted for the tip label. Task-number: QTBUG-46701 Change-Id: I6fd373ce13aed860b0d4836d5fbf470374ed2543 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>bb10
parent
d03415b7eb
commit
24239aef35
|
|
@ -342,7 +342,13 @@ bool QTipLabel::eventFilter(QObject *o, QEvent *e)
|
|||
case QEvent::FocusIn:
|
||||
case QEvent::FocusOut:
|
||||
#endif
|
||||
case QEvent::Close: // For QTBUG-55523 (QQC) specifically: Hide tooltip when windows are closed
|
||||
case QEvent::Close:
|
||||
// For QTBUG-55523 (QQC) specifically: Hide tooltip when windows are closed,
|
||||
// unless the close event is for the this tooltip, in which case we don't
|
||||
// recursively hide/close again.
|
||||
if (o != windowHandle() && o != this)
|
||||
hideTipImmediately();
|
||||
break;
|
||||
case QEvent::MouseButtonPress:
|
||||
case QEvent::MouseButtonRelease:
|
||||
case QEvent::MouseButtonDblClick:
|
||||
|
|
|
|||
Loading…
Reference in New Issue