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

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes