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

containsMouse of MouseArea is always true after pressed with propagateComposedEvents

    XMLWordPrintable

Details

    • 2af8743aa (dev), b08dcd760 (6.4), c4358550b (6.5)

    Description

      It happenes from 5.12 to 6.4.

       

      mouseArea1's containsMouse is always true after a click.

      The pressed event is propagated so that it's not accepted.

      Then, the MouseArea seems to miss the related released event  while keeping 

      the containsMouse 'true'

       

      import QtQuick 2.12
      
      import QtQuick.Window 2.12
      
       
      
      Window {
      
          width: 640
      
          height: 480
      
          visible: true
      
          title: qsTr("Hello World")
      
       
      
          Rectangle {
      
              id: leftR
      
              color: "red"
      
              width:200; height: 200
      
              anchors.left: parent.left
      
       
      
              MouseArea {
      
                  id: mouseArea1
      
                  propagateComposedEvents: true
      
                  hoverEnabled: false
      
                  anchors.fill: parent
      
       
      
                  onPressed: { mouse.accepted = false; console.info("pressed", containsMouse);}
      
                  onContainsMouseChanged: console.info("mouseArea1 containsMouse",containsMouse)
      
              }
      
          }
      
       
      
          Rectangle {
      
              id: rightR
      
              color: "blue"
      
              width:200; height: 200
      
              anchors.left: leftR.right
      
       
      
              MouseArea {
      
                  id: mouseArea2
      
                  hoverEnabled: true
      
                  anchors.fill: parent
      
                  //onContainsMouseChanged: console.info("mouseArea2",containsMouse)
      
              }
      
          }
      
      }
       

      Attachments

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

        Activity

          People

            santhoshkumar Santhosh Kumar Selvaraj
            elvis Elvis Lee
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes