diff --git a/src/widgets/helper/NotebookTab.cpp b/src/widgets/helper/NotebookTab.cpp index 51812e7c7..f3f2f7643 100644 --- a/src/widgets/helper/NotebookTab.cpp +++ b/src/widgets/helper/NotebookTab.cpp @@ -479,6 +479,15 @@ void NotebookTab::mouseMoveEvent(QMouseEvent *event) Button::mouseMoveEvent(event); } +void NotebookTab::wheelEvent(QWheelEvent *event) +{ + if (event->delta() > 0) { + this->notebook_->selectPreviousTab(); + } else { + this->notebook_->selectNextTab(); + } +} + QRect NotebookTab::getXRect() { // if (!this->notebook->getAllowUserTabManagement()) { diff --git a/src/widgets/helper/NotebookTab.hpp b/src/widgets/helper/NotebookTab.hpp index 15baebecc..4ec931acc 100644 --- a/src/widgets/helper/NotebookTab.hpp +++ b/src/widgets/helper/NotebookTab.hpp @@ -61,6 +61,7 @@ protected: virtual void dragEnterEvent(QDragEnterEvent *event) override; virtual void mouseMoveEvent(QMouseEvent *event) override; + virtual void wheelEvent(QWheelEvent *event) override; private: bool hasXButton();