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

MouseArea with no cursor set does not override the cursor of a MouseArea beneath it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • 5.1.0
    • None
    • c345388df18b7b468c2438990b7bc17658b3ab11

      import QtQuick 2.1
      import QtQuick.Controls 1.0
      
      Item {
        width: childrenRect.width + 20
        height: childrenRect.height + 20
      
        TextField {
          id: field
        }
      
        Rectangle {
          anchors {
            left: field.horizontalCenter
            right: field.right
            top: field.top
            bottom: field.bottom
          }
      
          color: area.containsMouse ? 'red' : 'blue'
      
          MouseArea {
            id: area
            anchors.fill: parent
            hoverEnabled: true
          }
        }
      }
      

      Hovering over the Rectangle still shows the cursor from the TextField

      Note also that explicitly setting cursorShape to Qt.ArrowCursor in the MouseArea doesn't work.

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

            daiweili Daiwei Li
            jfaust Josh Faust
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes