diff -r dee5afe5301f -r 3f74d0d4af4c src/gui/widgets/qabstractscrollarea.cpp --- a/src/gui/widgets/qabstractscrollarea.cpp Mon Mar 15 12:43:09 2010 +0200 +++ b/src/gui/widgets/qabstractscrollarea.cpp Thu Apr 08 14:19:33 2010 +0300 @@ -1134,13 +1134,10 @@ void QAbstractScrollArea::wheelEvent(QWheelEvent *e) { Q_D(QAbstractScrollArea); - QScrollBar *const bars[2] = { d->hbar, d->vbar }; - int idx = (e->orientation() == Qt::Vertical) ? 1 : 0; - int other = (idx + 1) % 2; - if (!bars[idx]->isVisible() && bars[other]->isVisible()) - idx = other; // If the scrollbar of the event orientation is hidden, fallback to the other. - - QApplication::sendEvent(bars[idx], e); + if (static_cast(e)->orientation() == Qt::Horizontal) + QApplication::sendEvent(d->hbar, e); + else + QApplication::sendEvent(d->vbar, e); } #endif