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

[REG 6.1->6.2] HoverHandler doesn't get hoverevents, when a button is on the parent

XMLWordPrintable

    • Windows
    • 0c7b0a4306 (qt/qtdeclarative/dev) d4c31ec0cd (qt/qtdeclarative/6.2) 66d6c7ec01 (qt/qtdeclarative/6.3) d4c31ec0cd (qt/tqtc-qtdeclarative/6.2)

      In the following example, we placed a button on an element with a HoverHandler.

      In Qt 5.15, the hovered property of the HoverHandler was also true, when hovering the button. In Qt 6.2.1, the hovered becomes false when hovering the button. In this example, the button will flicker, even when the cursor is hovering the Rectangle all the time.

      import QtQuick 2.15
      import QtQuick.Window 2.15
      import QtQuick.Controls 2.5
      
      Window {
        id: window
        width: 640
        height: 480
        visible: true
      
        Rectangle {
          width: 300
          height: 300
          color: "orange"
        
          Text {
            anchors.centerIn: parent
            text: "hover here"
          }
      	  
          Button {
            visible: hoverHandler.hovered
            text: "click"
          }
          HoverHandler { id: hoverHandler
          }
        }
      }
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            richard Richard Moe Gustavsen
            frichter Florian Richter
            Votes:
            10 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes