diff --git a/src/lib/other/statusbar.h b/src/lib/other/statusbar.h --- a/src/lib/other/statusbar.h +++ b/src/lib/other/statusbar.h @@ -59,6 +59,9 @@ void addButton(AbstractButtonInterface *button); void removeButton(AbstractButtonInterface *button); +protected: + void mousePressEvent(QMouseEvent *event); + private: BrowserWindow *m_window; TipLabel *m_statusBarText; diff --git a/src/lib/other/statusbar.cpp b/src/lib/other/statusbar.cpp --- a/src/lib/other/statusbar.cpp +++ b/src/lib/other/statusbar.cpp @@ -32,6 +32,7 @@ #include #include #include +#include class StatusBarButton : public ClickableLabel { @@ -241,3 +242,14 @@ delete m_widgets.take(button->id()).widget; } + +void StatusBar::mousePressEvent(QMouseEvent *event) +{ + if (event->button() == Qt::RightButton) { + QMenu context; + context.addAction(tr("Hide"), m_window, &BrowserWindow::toggleShowStatusBar); + context.exec(QCursor::pos()); + } + + QStatusBar::mousePressEvent(event); +}