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

CustomContextMenu opened from modal dialog not responding to mouse clicks on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.15, 6.2
    • 5.15.1
    • GUI: Menus
    • None
    • macOS Catalina 10.15.7
    • macOS

    Description

      When using a CustomContextMenu in a modal dialog, e.g., a QDialog subclass, on macOS, the context menu appears fine. However, it does not respond to mouse clicks, and menu items are highlighted inconsistently. You can only get items to highlight via mouse by moving the cursor outside the menu and slowly moving it back onto the menu - the item under the mouse will highlight. At that point, moving the mouse over other items has no effect. Also, clicking the highlighted item has no effect and causes a system error sound to be emitted.

      Interesting, items can be selected using the up and down arrow keys, followed by pressing the return key.

      The same code that works fine with Qt 5.12 does not work with Qt 5.15.1. It also works fine on linux and Windows.

      Attachments

        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
            cory.quammen Cory
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes