From: Flavio Tordini Date: Mon, 2 Nov 2009 20:21:46 +0000 (+0100) Subject: Clear status tip onmouse leave event X-Git-Tag: 0.8~33 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fef99d1db6507e90e4e5c896fd348a0c70748533;p=minitube Clear status tip onmouse leave event --- diff --git a/src/thlibrary/thblackbar.cpp b/src/thlibrary/thblackbar.cpp index dce936c..ae2c564 100644 --- a/src/thlibrary/thblackbar.cpp +++ b/src/thlibrary/thblackbar.cpp @@ -145,6 +145,12 @@ void THBlackBar::mousePressEvent (QMouseEvent *event) { } } +void THBlackBar::leaveEvent(QEvent *event) { + // status tip + QMainWindow* mainWindow = dynamic_cast(qApp->topLevelWidgets().first()); + if (mainWindow) mainWindow->statusBar()->clearMessage(); +} + QAction *THBlackBar::hoveredAction (const QPoint& pos) const { if (pos.y() <= 0 || pos.y() >= height()) return(NULL); diff --git a/src/thlibrary/thblackbar.h b/src/thlibrary/thblackbar.h index ec0ff11..4695780 100644 --- a/src/thlibrary/thblackbar.h +++ b/src/thlibrary/thblackbar.h @@ -24,6 +24,7 @@ class THBlackBar : public QWidget { void mouseMoveEvent (QMouseEvent *event); void mousePressEvent (QMouseEvent *event); + void leaveEvent(QEvent *event); private: void drawUnselectedButton ( QPainter *painter,