diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-02-05 16:15:59 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-06 06:31:55 -0800 |
commit | 2a9289ac99f5be630e768a97dc30525c15e430ce (patch) | |
tree | da476da48c82239d6a4ffe2924a5b5c2cd6e2dd6 /qt-ui/profile/profilewidget2.cpp | |
parent | 151a90bec0610a12880802234a9159a2b3747722 (diff) | |
download | subsurface-2a9289ac99f5be630e768a97dc30525c15e430ce.tar.gz |
Add an event filter to hide normal tooltips
This patch adds an event filter to hide normal tooltips on the new
profile. All tooltips should be displayed in the Notification Area.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index b949cd9f0..251ea383a 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -351,7 +351,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : // Starting the transitions: stateMachine->start(); - + scene()->installEventFilter(this); #ifndef QT_NO_DEBUG QTableView *diveDepthTableView = new QTableView(); diveDepthTableView->setModel(dataModel); @@ -535,3 +535,13 @@ void ProfileWidget2::mouseMoveEvent(QMouseEvent* event) } } +bool ProfileWidget2::eventFilter(QObject *object, QEvent *event) +{ + QGraphicsScene *s = qobject_cast<QGraphicsScene*>(object); + if (s && event->type() == QEvent::GraphicsSceneHelp){ + event->ignore(); + return true; + } + return QGraphicsView::eventFilter(object, event); +} + |