aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/browsertabbar.cpp
blob: 503157fa687ca7b50a84f29f296409c607dda618 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
    }
}