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

MouseArea's cursorShape effective only after cursor moves

    XMLWordPrintable

    Details

    • Commits:
      e622e069c9b0928e09a8b6fef15168407a4d995a (qt/qtdeclarative/5.12)

      Description

      When the mouse cursor is over a MouseArea when its cursorShape is set, the cursor's appearance only changes after it is moved at least minimally.

      The following code example demonstrates the problem: The mouse cursor over the fullscreen window only changes after moving the mouse slightly.

      import QtQuick 2.3
      import QtQuick.Window 2.0
      
      Rectangle {
          width: Screen.width
          height: Screen.height
      
          MouseArea {
              anchors.fill: parent
              cursorShape: Qt.CrossCursor
              onClicked: Qt.quit()
          }
      }
      

      Please note:

      • Setting hoverEnabled to true doesn't make a difference.
      • changing the cursorShape delayed (e. g. with a Timer or Component.onCompleted()) doesn't make a difference.

      I think the proper behaviour would be for the mouse cursor's shape to change immediately without user interaction.

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                andysh Andy Shaw
                Reporter:
                jbhuth Jan Budde
              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes