Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6876

Gesture event propagation doesn't work as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • 4.7.4
    • 4.6.0
    • Core: Event loop
    • None
    • 9fe43ff4e313220a1ecb02a990324cb6b768e585

    Description

      It seems like if the topmost item ignores a gesture, it will get propagated to all items below (for which Qt::ReceivePartialGestures is set). This happens because after the target item has ignored the gesture, the targetItems list is grown by all conflicting items, and then the delivery is started again, sending the events to all targetItems.

      The attached autotest reproduces the problem, however as I was adding more and more assertions there, I noticed another potential problem (in the testcase, the original problem can be reproduced with mouse events). I don't know if this is because of QTest::touchEvent() etc, but somehow it seems the gesture recognizer receives the same touchbegin two times, thus triggering two instances of the same gesture. This could be somehow related to how the touch events are delivered to the scene objects? The gesture manager probably intercepts the same touchbegin twice?

      I'm attaching the current version of the autotest. There is a bool VerifyCounts on line 129, setting it to true will cause the test to fail if the object receives two gestures in started state. If VerifyCounts is false, the test will proceed to fail on line 164, where it checks the bottom object (it should not receive any gesture events, but does).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            earthdomain Earth Domain (Inactive)
            dzyubenk Denis Dzyubenko (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes