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

The Menu Item will continue to be highlighted after the sub menu is closed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.4, 6.3.0
    • Quick: Controls 2
    • None
    • macOS
    • 9bebb7017 (dev), 106365d37 (6.9), f893dbccd (tqtc/lts-6.8), 169caa41f (tqtc/lts-6.5)

    Description

      Steps to reproduce:
      1) Launch the application
      2) Open the menu (press the left mouse button) near the right side of the window so that the sub-menu opens to its left
      3) Hover the mouse over the item with the sub menu
      4) Hover item of sub menu(second or below)
      5) Hover the main menu item(second or below)
      Actual result:
      The item with the submenu continue to be highlighted
      Expected result:
      The item with the submenu should not be highlighted

      A video with a replay of the problem has been attachedĀ 

      import QtQuick
      import QtQuick.Controls
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          Menu {
              id: menu
              title: "Menu"
      
              delegate: MenuItem {
                  background: Rectangle {
                      color: hovered ? "red" : "white"
                  }
              }
      
              Menu {
                  title: "Sub menu"
      
                  MenuItem {
                      text: "Item1"
                  }
                  MenuItem {
                      text: "Item2"
                  }
                  MenuItem {
                      text: "Item3"
                  }
              }
      
              MenuItem {
                  text: "Item1"
              }
      
              MenuItem {
                  text: "Item2"
              }
          }
      
          TapHandler {
              onTapped: menu.popup()
          }
      }
      
      

      Attachments

        For Gerrit Dashboard: QTBUG-105856
        # Subject Branch Project Status CR V

        Activity

          People

            mitch_curtis Mitch Curtis
            andrei haladok Andrei Haladok
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change