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

MouseArea: positioning mode

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.11.2
    • Quick: Controls 2
    • None

      Currently there is no easy way to get the client or screen position of the mouse with qml. Sometimes, e.g when adjusting the position of another Window or Tooltip, it is necessary to get the position relative to window or screen origin.

      To get the client or screen position right now, you have to manually walk the scene graph and add the relative position of each Item.

      I propose a new property for MouseArea, called "posititioning" or similar, with the enum values:
      MouseArea.ItemPosition, MouseArea.WindowPosition and MouseArea.ScreenPosition which defaults to the MouseArea.ItemPosition to allow adjusting the origin used for the properties mouseX, mouseY and position.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes