diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index cbfa04518d..329639a057 100644 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -49,6 +49,9 @@ CClientDlg::CClientDlg ( CClient* pNCliP, { setupUi ( this ); + // install event filter for tooltips + qApp->installEventFilter ( this ); + // Add help text to controls ----------------------------------------------- // input level meter QString strInpLevH = "" + tr ( "Input Level Meter" ) + ": " + @@ -1516,3 +1519,14 @@ void CClientDlg::SetPingTime ( const int iPingTime, const int iOverallDelayMs, c // set current LED status ledDelay->SetLight ( eOverallDelayLEDColor ); } + +bool CClientDlg::eventFilter ( QObject* obj, QEvent* event ) +{ + if ( event->type() == QEvent::ToolTip && !pSettings->bShowToolTips ) + { + return true; // don't show tooltip + } + + // continue with normal processing of event + return QObject::eventFilter ( obj, event ); +} diff --git a/src/clientdlg.h b/src/clientdlg.h index 2a9062a58d..747326a9f1 100644 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -120,6 +120,7 @@ class CClientDlg : public CBaseDlg, private Ui_CClientDlgBase virtual void dragEnterEvent ( QDragEnterEvent* Event ) { ManageDragNDrop ( Event, true ); } virtual void dropEvent ( QDropEvent* Event ) { ManageDragNDrop ( Event, false ); } void UpdateDisplay(); + bool eventFilter ( QObject* obj, QEvent* event ); CClientSettingsDlg ClientSettingsDlg; CChatDlg ChatDlg;