QNX: Fix QToolTip
The problem is that on QNX the window activation and focus events are delayed. QToolTip can not handle this and would hide the tool tip right after it is created. Change-Id: I6045d1d277b73508c24174d72a05e0baa4ae6e7f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This commit is contained in:
parent
634b9b1e5c
commit
ea057c8372
@ -322,13 +322,32 @@ bool QTipLabel::eventFilter(QObject *o, QEvent *e)
|
||||
case QEvent::Leave:
|
||||
hideTip();
|
||||
break;
|
||||
|
||||
|
||||
#if defined (Q_OS_QNX) // On QNX the window activate and focus events are delayed and will appear
|
||||
// after the window is shown.
|
||||
case QEvent::WindowActivate:
|
||||
case QEvent::FocusIn:
|
||||
return false;
|
||||
case QEvent::WindowDeactivate:
|
||||
if (o != this)
|
||||
return false;
|
||||
hideTipImmediately();
|
||||
break;
|
||||
case QEvent::FocusOut:
|
||||
if (reinterpret_cast<QWindow*>(o) != windowHandle())
|
||||
return false;
|
||||
hideTipImmediately();
|
||||
break;
|
||||
#else
|
||||
case QEvent::WindowActivate:
|
||||
case QEvent::WindowDeactivate:
|
||||
case QEvent::FocusIn:
|
||||
case QEvent::FocusOut:
|
||||
#endif
|
||||
case QEvent::MouseButtonPress:
|
||||
case QEvent::MouseButtonRelease:
|
||||
case QEvent::MouseButtonDblClick:
|
||||
case QEvent::FocusIn:
|
||||
case QEvent::FocusOut:
|
||||
case QEvent::Wheel:
|
||||
hideTipImmediately();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user