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

Cursor does not remain the same while dragging from inside to outside a MouseArea

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • None
    • 5.1.0
    • None

    Description

      import QtQuick 2.1
      import QtQuick.Controls 1.0
      import QtQuick.Layouts 1.0
      
      SplitView {
        width: 200
        height: 200
        Rectangle {
          Layout.minimumWidth: 50
          height: 200
          color: 'blue'
          MouseArea {
            anchors.fill: parent
            cursorShape: Qt.PointingHandCursor
            hoverEnabled: true
            onContainsMouseChanged: console.warn('blue', containsMouse)
          }
        }
      
        Rectangle {
          Layout.minimumWidth: 50
          height: 200
          color: 'green'
          MouseArea {
            anchors.fill: parent
            cursorShape: Qt.PointingHandCursor
            hoverEnabled: true
            onContainsMouseChanged: console.warn('green', containsMouse)
          }
        }
      }
      
      • Click on the splitter
      • Drag left or right
      • Notice that the cursor turns to the pointing hand (even though the MouseArea still never thinks it contains the mouse)

      Expected: the cursor should remain the same as when the drag started as long as the mouse button is held.

      This isn't a Controls issue, it was just easiest to show a practical example using SplitView.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              jfaust Josh Faust
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes