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

hovered property is true even when under a popup in a Window

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.7.1
    • 5.7
    • Quick: Controls 2
    • None
    • df12dbe976876bbb4e36b16eb4836c4109bb80d0

    Description

      Resulted from QTBUG-53419. The following case has been fixed for ApplicationWindow, but still has issues when using a plain Window (where the overlay event delivery is based on a window-level event filter).

      An example of where this is an issue is ToolTip; the tooltip shows up even when the menu is open:

      import QtQuick 2.7
      import QtQuick.Window 2.2
      import QtQuick.Controls 2.0
      
      Window {
          visible: true
      
          Menu {
              id: menu
      
              MenuItem {
                  text: "Item 1"
              }
              MenuItem {
                  text: "Item 2"
              }
              MenuItem {
                  text: "Item 3"
              }
          }
      
          Button {
              text: "Button"
              hoverEnabled: true
              anchors.centerIn: parent
              onClicked: menu.open()
              onHoveredChanged: print("hovered", hovered)
      
              ToolTip.text: "ToolTip"
              ToolTip.visible: hovered
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jpnurmi J-P Nurmi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: