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
          Shawn Rutledge
        2. backwards.png
          26 kB
          Shawn Rutledge
        3. delivery-order.png
          71 kB
          Shawn Rutledge
        4. delivery-order.svg
          20 kB
          Shawn Rutledge
        5. hoverhandler-sample.zip
          2 kB
          Takanori Hoshijima
        6. objects.dot
          0.4 kB
          Shawn Rutledge
        7. simpler.dot
          0.5 kB
          Shawn Rutledge
        8. simpler.png
          25 kB
          Shawn Rutledge
        9. simpler.qml
          1 kB
          Shawn Rutledge
        10. snippet.qml
          2 kB
          Shawn Rutledge
        11. workaround.qml
          2 kB
          Shawn Rutledge

        Issue Links

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

          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