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

if hoverring on a submenu in QMenu, we will get Leave events

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.5.5
    • GUI: Menus
    • None
    • Linux/X11

      In a QMenu there are submenus and actions. If hovering on a submenu item, the submenu will be shown, and we will get leave events from almost all widgets, and not any new enter event. What expected is, as long as the mouse is inside the menu, no leave events should be raised.

      Small example code is attached. The dock widget contains a menu. The central widget of the main window shows all Enter and Leave events of the qApp.

      How to repeat:

      1. move mouse into the dock widget on the left, we see Enter events in the plain text widget
      2. hover mouse on submenu item 'menu2', the submenu will be drawn, and we will see theĀ  QEvent::Leave events in the plain text widget. (Remark: no need to hover on 'action2')

        1. qmenu_leave_event_bug.png
          124 kB
          Tianyang Wang
        2. bug_qmenu_leave_event.7z
          4 kB
          Tianyang Wang
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            wang-in Tianyang Wang
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes