From 644400387d0e61ff8a2486624867e015d8e36940 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Tue, 6 Apr 2010 18:18:03 +0200 Subject: [PATCH] Finally found a way to kill tooltips --- src/MainWindow.cpp | 13 +++++++++++++ src/MainWindow.h | 1 + 2 files changed, 14 insertions(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 0c85e5f..767aaa5 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -46,6 +46,9 @@ MainWindow::MainWindow() : // restore window position readSettings(); + // event filter to block ugly toolbar tooltips + qApp->installEventFilter(this); + // show the initial view showWidget(searchView); @@ -56,6 +59,16 @@ MainWindow::~MainWindow() { delete history; } +bool MainWindow::eventFilter(QObject *obj, QEvent *event) { + if (event->type() == QEvent::ToolTip) { + // kill tooltips + return true; + } else { + // standard event processing + return QObject::eventFilter(obj, event); + } +} + void MainWindow::createActions() { QMap *actions = The::globalActions(); diff --git a/src/MainWindow.h b/src/MainWindow.h index 67bf1e2..bcd3a71 100755 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -26,6 +26,7 @@ public slots: protected: void closeEvent(QCloseEvent *); + bool eventFilter(QObject *obj, QEvent *event); private slots: void fadeInWidget(QWidget *oldWidget, QWidget *newWidget); -- 2.39.5