]> git.sur5r.net Git - minitube/commitdiff
Clear status tip onmouse leave event
authorFlavio Tordini <flavio.tordini@gmail.com>
Mon, 2 Nov 2009 20:21:46 +0000 (21:21 +0100)
committerFlavio Tordini <flavio.tordini@gmail.com>
Mon, 2 Nov 2009 20:21:46 +0000 (21:21 +0100)
src/thlibrary/thblackbar.cpp
src/thlibrary/thblackbar.h

index dce936c1b6008b66a496c327bae93afe703e5c31..ae2c564cc4bf1ebfb75f2ee1b858f15d6b5b225c 100644 (file)
@@ -145,6 +145,12 @@ void THBlackBar::mousePressEvent (QMouseEvent *event) {
     }
 }
 
+void THBlackBar::leaveEvent(QEvent *event) {
+    // status tip
+    QMainWindow* mainWindow = dynamic_cast<QMainWindow*>(qApp->topLevelWidgets().first());
+    if (mainWindow) mainWindow->statusBar()->clearMessage();
+}
+
 QAction *THBlackBar::hoveredAction (const QPoint& pos) const {
     if (pos.y() <= 0 || pos.y() >= height())
         return(NULL);
index ec0ff1176eb1807d984576a708edcfc1d24ac2e0..469578042902f4f06ec0023b171dc842631ad402 100644 (file)
@@ -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,