Guarantee event's default state as not accepted
authorArthur Mello <arthur.mello@canonical.com>
Wed, 19 Feb 2014 12:37:15 +0000 (09:37 -0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 19 Feb 2014 18:41:12 +0000 (19:41 +0100)
Before starting the evaluation of the event to check if it should be
accepted or not, set the state of the wheelEvent to not accepted. That
way, if the event is not accepted it will be propagated to others
elements.

Change-Id: I13a71db8e26c888adc03f1bfd3e46480d3b22b6f
Task-number: QTBUG-36774
Reviewed-by: Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
src/quick/items/qquickflickable.cpp

index 789d195..2f2c932 100644 (file)
@@ -1262,6 +1262,8 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event)
         return;
     }
 
+    event->setAccepted(false);
+
     int yDelta = event->angleDelta().y();
     int xDelta = event->angleDelta().x();
     if (yflick() && yDelta != 0) {