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

When a HoverHandler is placed inside an Item, the parent's children do not get the Hoverevent.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.2.5, 6.3.0
    • None
    • Windows
    • 5c844a30a (dev)

    Description

      HoverHandler inside an Item and a Hoverhandler inside a child of the Item's parent.
      In Qt6.2.4, both Hoverhandlers work; in Qt6.2.5, only the topmost Hoverhandler works.

      Window {
          width: 640
          height: 480
          visible: true
          Row {
              anchors.fill: parent
              Rectangle {
                  width: parent.width/2
                  height: parent.height
                  color:"lightgray"
                  Text {
                      id: text1
                      anchors.top: parent.top
                      anchors.topMargin: 20
                      anchors.horizontalCenter: parent.horizontalCenter
                      text: "hover"
                  }
                  Rectangle {
                      anchors.top: text1.bottom
                      anchors.horizontalCenter: parent.horizontalCenter
                      width: 300
                      height: 300
                      color: "green"
                      visible: hoverhHandler.hovered
                      Text {
                          id: rectText
                          anchors.centerIn: parent
                          text: "green rectangle hovered"
                          visible: rectHoverHandler.hovered
                      }
                      Item {
                          anchors.fill: parent
                          HoverHandler {
                              id: rectHoverHandler
                          }
                      }
                  }
                  Item {
                      anchors.fill: parent
                      HoverHandler {
                          id: hoverhHandler
                      }
                  }
              }
          }
      }

      Attachments

        1. backwards.dot
          0.7 kB
        2. backwards.png
          backwards.png
          26 kB
        3. delivery-order.png
          delivery-order.png
          71 kB
        4. delivery-order.svg
          20 kB
        5. hoverhandler-sample.zip
          2 kB
        6. objects.dot
          0.4 kB
        7. simpler.dot
          0.5 kB
        8. simpler.png
          simpler.png
          25 kB
        9. simpler.qml
          1 kB
        10. snippet.qml
          2 kB
        11. workaround.qml
          2 kB

        Issue Links

          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
              hoshijima Takanori Hoshijima
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes