From ea47d152b35158ba07a55d009f57df0e4c2a048f Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 27 Mar 2015 17:47:42 +0100 Subject: [PATCH] QTabBar: Disable wheel events on Mac Many people complain about this unexpected behavior. We may consider introducing a style hint later for those few people that may want it. Change-Id: Ifab663b4b5c3a78a3544ab4408cf34f672df8c05 Task-number: QTBUG-8428 Reviewed-by: Timur Pocheptsov --- src/widgets/widgets/qtabbar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index 02c34d9ef6..02967e33c1 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -2031,10 +2031,12 @@ void QTabBar::keyPressEvent(QKeyEvent *event) #ifndef QT_NO_WHEELEVENT void QTabBar::wheelEvent(QWheelEvent *event) { +#ifndef Q_OS_MAC Q_D(QTabBar); int offset = event->delta() > 0 ? -1 : 1; d->setCurrentNextEnabledIndex(offset); QWidget::wheelEvent(event); +#endif } #endif //QT_NO_WHEELEVENT