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

Qt event loop stop generating (or blocks) mouse clicks from touch events after receiver is deleted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.15.7
    • None
    • I use Iiyama ProLite T2453MIS monitor, but I think any touch screen will do.
    • Linux/X11

    Description

      Actually, this bug is probably present in all 5.x versions of Qt. Debian buster, bullseye, Fedora 36 and 37 - all distro versions are affected.

      With touch screen mouse events are generated from touch events. When tap happens in a widget at the moment it gets deleted, mouse clicks get stuck with that widget and mouse clicks are no longer sent to the application.

      First discovered this with popup windows and context menus that are deleted on close (eg finished() signal is connected to deleteLater() slot). When you tap outside a popup element, it receives the mouse click, gets closed and deleted. No more mouse clicks are coming out of event loop. When dealing with this issue, workaround was found: connect finished() to deleteLater() using Qt::QueuedConnection.

      But now we found that normal dialogs are affected as well and QueuedConnection does not help in this case. The easiest way to reproduce it (although not from real life usage):

      • start Qt Assistant application, ensure touch screen taps are translated into mouse clicks (links in Assistant work);
      • open some dialog (Page setup or Print preview, for example);
      • tap somewhere inside the dialog (even empty non-functional space) and hold the touch;
      • while holding, press Esc on your keyboard to close the dialog;
      • check if you still can tap links in the assistant.

      Instead of using keyboard it's possible to get the same effect with multi-touch screen: just tap and hold Ok or Cancel button in the dialog, tap somewhere in the dialog with your other finger, and while holding the second tap, release the first one (button gets released, dialog closes and mouse clicks are blocked).

      I have more real life example, but I'll skip it for now to keep description shorter.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            drongo Roman L
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes