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

Details

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

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes