diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-11-17 15:20:28 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-11-17 15:23:40 (GMT) |
commit | 39463ccddd6f8c071da90e995ba5e76518738f94 (patch) | |
tree | 25e1dc1d894bdffbc2258fc171f5c4f31cce02f5 /src/gui/itemviews | |
parent | b914ba0d4dc1bc1e125fecde28c1be6a7ef90bb5 (diff) | |
download | Qt-39463ccddd6f8c071da90e995ba5e76518738f94.zip Qt-39463ccddd6f8c071da90e995ba5e76518738f94.tar.gz Qt-39463ccddd6f8c071da90e995ba5e76518738f94.tar.bz2 |
Mouse wheel wouldn't scroll the itemview when over header views
The mouse wheel event was not being relayed to the parent (supposedly QAbstractScrollArea) widget. Auto-test included.
Reviewed-by: Olivier
Task-number: QTBUG-5237
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r-- | src/gui/itemviews/qheaderview.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index 6f2cff9..5df8481 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -2396,7 +2396,12 @@ bool QHeaderView::viewportEvent(QEvent *e) d->state = QHeaderViewPrivate::NoState; d->pressed = d->section = d->target = -1; d->updateSectionIndicator(d->section, -1); - } + break; } + case QEvent::Wheel: { + QAbstractScrollArea *asa = qobject_cast<QAbstractScrollArea *>(parentWidget()); + if (asa) + return QApplication::sendEvent(asa->viewport(), e); + break; } default: break; } |