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

Qt 6.5: missing click when single-clicking alternating items

XMLWordPrintable

    • All

      This issue is related to QTBUG-116442. TL;DR, I think fixing QTBUG-116442 may also fix this issue.

      In the attached example in QTBUG-116442, if run against Qt 6.5.1, the MouseArea will not emit the clicked signal for its second click (the third click in the testcase). The reason for this is a behavior change in QQuickItem:

      void QQuickItem::mouseDoubleClickEvent(QMouseEvent *event)
      {
          event->ignore(); // <== this was introduced
      }
      

      This ignore causes QQuickDeliveryAgent to cancel mouse event synthesis:

                          QCoreApplication::sendEvent(item, &mouseDoubleClick);
                          event.setAccepted(mouseDoubleClick.isAccepted());
                          if (!mouseDoubleClick.isAccepted())
                              cancelTouchMouseSynthesis(); // <== this happens
                      }
      

      ...And the consequence of this is that the cancel function sets "touchMouseId = -1" which prevents

              } else if (touchMouseDevice == device && p.id() == touchMouseId) {
      

      which fails to send MouseButtonRelease which is why, it seems, the click isn't received.

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

            oulu_hillbilly Sami Varanka
            andrhans Andreas Aardal Hanssen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes