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

MouseArea cursor shape behavior is flawed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.7.0
    • None
    • any

    Description

      I found two issues with the behavior of MouseArea in regard with the cursor shape:

      Issue 1:
      The cursor shape is not held while the mouse area is pressed, it revers to normal when the cursor goes out of the area. This is problematic, because the visual hint only stays relevant when the cursor is directly over the area, not while the user is interacting with it. Examples:

      A resize handle cursor will flicker as the cursor moves ahead of the handle until it catches up - QML seems rather laggy in this aspect, as bindings take visibly noticeable time to catch up with the cursor. Also, when the handle reaches its limit the cursor will permanently stay outside of its area, so it will no longer keep the resize shape even if the user is still resizing by moving the cursor back into the limits. The resize cursor should stay until the resize handle press is released.

      A volume knob that is manipulated by either moving the mouse up-down or left-right. It is literally impossible to operate similar controls while keeping the mouse cursor in, and the cursor shape will revert to normal as soon as it leaves the knob. The cursor should be kept to indicate the user is manipulating the knob until the knob press is released.

      In short, the mouse cursor should not be determined by whether or not the cursor is strictly in the mouse area. Instead, it should be determined by whether or not it is in the control of the mouse area. That includes presses which then go outside of the mouse area, until the press is released.

      Issue 2:
      While trying to find a way to work around issue 1 using an overlay mouse area, I noticed that a disabled mouse area will still toggle the mouse cursor, and even if disabled, it will prevent underlying mouse areas to set the shape. A disabled mouse area should not affect the cursor. Notice the difference between having the mouse area disabled, and setting accepted buttons to NoButton. The latter approach is the one used when an "override" of cursor is intended without intercepting the event. While a disabled mouse area should not have any influence on the cursor shape.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            dgo dgo
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes