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 <Timur.Pocheptsov@digia.com>
Gabriel de Dietrich 2015-03-27 17:47:42 +01:00 committed by Timur Pocheptsov
parent 08cc9b9991
commit ea47d152b3
1 changed files with 2 additions and 0 deletions

View File

@ -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