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

TapHandler "hangs" if QtQuick window looses focus during onPressedChanged

    XMLWordPrintable

Details

    • Linux/X11

    Description

      Whether mimicking MenuBar item, reimplementing PushButton with dropdown, ComboBox, or just opening a context menu from anywhere, you might want to open a modal popup on press, not on click, for a smoother user experience, native desktop feel.

      The problem is, QtQuick/TapHandler gets "stuck" if another window is opened & focused during onPressedChanged handling. Moreover, the glitch differs between Qt 5.x and 6.x branches.

      In qt5-declarative 5.15.8+kde+r24-1 all subsequent clicks on the same TapHandler are ignored until user clicks somewhere outside of it.

      In Qt 6.4.2-1 only the first click is ignored, but the second is registered again, and onPressedChanged gets called too.

      The example attached shows three different approaches to open a popup and reproduce the glitch.

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              ratijas ivan tkachenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes