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

MouseArea: getting all events.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.11.2
    • None

    Description

      Sometimes it is necessary for a MouseArea to get all events.

      Flickables are handled quite well, and are not a problem by setting preventStealing: true

      The following things can still make a MouseArea unable to receive an event.

      1. It is overlapped by another MouseArea. Here you are at grace of the other MouseArea's propagation settings. This can get quite messy, sometimes it can be unclear which MouseArea is the one responsible for a certain position, and propagation only works to children of the parent MouseArea, and they are often used as leaf Items. Often you still want to know the current position of the mouse, or know when the mouse was clicked but have no way of doing so.

      2. It is overlapped or has a children Popup/Control/Page/Pane. In this case there is no way at all to get e.g position updates of the MouseArea. This is extremely inconvenient when designing Components that have no control over the children that might be added.

      I propose adding a new property to the MouseArea that allows receiving all mouse events in that region in the order of their z value (similar to popups) before anything else, but unless the events are explicitly accepted, they are propagated normally through wherever they have to go (not only children) after going through those exclusive priority mouse areas.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mr.greywater mr.greywater
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes