diff options
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 8abec2b05e..9281744692 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -729,6 +729,8 @@ QWheelEvent::QWheelEvent(const QPointF &pos, int delta, : QInputEvent(Wheel, modifiers), p(pos), qt4D(delta), qt4O(orient), mouseState(buttons), ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized) { + if (!QGuiApplicationPrivate::scrollNoPhaseAllowed) + ph = Qt::ScrollUpdate; g = QCursor::pos(); if (orient == Qt::Vertical) angleD = QPoint(0, delta); @@ -764,6 +766,8 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, int delta : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), qt4D(delta), qt4O(orient), mouseState(buttons), ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized) { + if (!QGuiApplicationPrivate::scrollNoPhaseAllowed) + ph = Qt::ScrollUpdate; if (orient == Qt::Vertical) angleD = QPoint(0, delta); else @@ -800,7 +804,10 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta), angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized) -{} +{ + if (!QGuiApplicationPrivate::scrollNoPhaseAllowed) + ph = Qt::ScrollUpdate; +} /*! Constructs a wheel event object. |