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

Quickly clicking two different graphics items should not cause a double click event to be sent

    XMLWordPrintable

Details

    Description

      Run attached example mousearea_bug.qml with qmlviewer. Click brighter red item that is closer to the center to cause the items to swap places, then quickly click the second item that moves underneath the cursor/finger. What you would expect is that both clicked items receive their own press. release and click events, instead the second item only receives a release and a double click event.

      One place where the above mis-detection causes problems is when user is clicking date and time items in date and time picker widget to scroll the picker list in steps: some of the clicks will be mysteriously swallowed.

      The problem seems to be caused by Qt mouse event handling being done on QWidget -level: on QWidget -level the system sees QGraphicsView being double clicked (one action), when in fact what is really happening is that in QGraphicsItem -level two separate items are being clicked (two actions). Clicking is a primary action in direct touch UIs with the double clicking coming as a distant second in overall importance, quickly clicking items should always result in primary action being performed if nothing has been defined for double clicking. In mobile UIs double clicking is mostly used for one limited use case: zooming in scrollable/flickable areas like web pages and images.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jpetrell Joona Petrell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes