diff options
Diffstat (limited to 'src/widgets/browsertabbar.cpp')
| -rw-r--r-- | src/widgets/browsertabbar.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/widgets/browsertabbar.cpp b/src/widgets/browsertabbar.cpp new file mode 100644 index 0000000..503157f --- /dev/null +++ b/src/widgets/browsertabbar.cpp @@ -0,0 +1,18 @@ +#include "browsertabbar.hpp" + +#include <QMouseEvent> + +BrowserTabBar::BrowserTabBar(QWidget *parent) : + QTabBar(parent) +{ + +} + +void BrowserTabBar::mouseReleaseEvent(QMouseEvent *event) +{ + if(event->button() == Qt::MiddleButton) { + emit tabCloseRequested(this->tabAt(event->pos())); + } else { + QTabBar::mousePressEvent(event); + } +} |
