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

QPushButton or QToolButton does not receive mouse events after calling setMenu().

    XMLWordPrintable

Details

    • Linux/Wayland, Linux/X11
    • ec24b36d3 (dev), 39e9b6b24 (6.7), 45efad720 (6.6), f34a3e6f9 (tqtc/lts-6.5), 260d13177 (tqtc/lts-6.2), 0b726e802 (tqtc/lts-5.15)

    Description

      When a QPushButton or QToolButton is pressed, moved outside the button, and released, it receives MouseButtonRelease, Leave, and Release events. However, if a menu is set for the button using the setMenu method, clicking the button triggers the menu to appear, and if the button is pressed again, causing the menu to disappear, releasing the button outside the control or application, the button is not receiving any events.
      This problem frequently occurs on touchscreens, resulting in a poor user experience.
      The attached demo can reproduce this issue.

      Attachments

        1. cursor-test.tar.gz
          0.7 kB
        2. QTBUG-119864-v1.diff
          3 kB
        3. test-toolbutton.tar.gz
          1 kB

        Issue Links

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

          Activity

            People

              axelspoerl Axel Spoerl
              fnoily Yang Liu
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: