mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
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>
This commit is contained in:
parent
151a90bec0
commit
2a9289ac99
2 changed files with 12 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ public:
|
|||
|
||||
ProfileWidget2(QWidget *parent);
|
||||
void plotDives(QList<dive*> dives);
|
||||
virtual bool eventFilter(QObject*, QEvent*);
|
||||
|
||||
public slots: // Necessary to call from QAction's signals.
|
||||
void settingsChanged();
|
||||
|
|
Loading…
Add table
Reference in a new issue