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

MenuItem is still highlighted when Menu is no longer hovered

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.5.3
    • Quick: Controls 2
    • None
    • Linux/Wayland, macOS, Windows

    Description

      MenuItem.highlight should be set to false when menu looses hover state:

      Steps:

      • Launch Following QML
      • open menu and hover item 3
      • Background becomes orange (fine)
      • move your mouse out of Menu
      • Background should become green again, but it stays orange.

      It may be related to QTBUG-105856

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow {
          id: win
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello Menus")
      
          property bool menuHighlighted: false
      
      
          Rectangle {
              anchors.fill: parent
              color: win.menuHighlighted ? "orange" : "lightgreen"
          }
      
          MenuBar {
              Menu {
                  title: qsTr("Menu")
                  MenuItem {
                      text: qsTr("Item 1")
                  }
                  MenuItem {
                      text: qsTr("Item 2")
                  }
                  MenuItem {
                      text: qsTr("Item 3")
                      onHighlightedChanged: {
                          win.menuHighlighted = highlighted
                      }
                  }
              }
          }
      }
      

      Attaching a video of the problem

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            leglaude Guillaume BOTTESI
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change