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

[tabHandler.onLongPress] Context.popup appears at last mouse position instead placement of touch

XMLWordPrintable

      1. mouse long press on red rectangle
      2. context menu appears on cursor
      3. place cursor on blue rectangle
      4. touch on touch screen in red rectangle

      Actual result: context menu popup appears in blue rectangle
      Example

      import QtQuick
      import QtQuick.Controls
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Rectangle {
              width: 100; height: 100
              color: "red"
              anchors.left: parent.left
              anchors.top: parent.top
      
              TapHandler {
                  onLongPressed: {
                      contextMenu.popup()
                  }
              }
          }
      
          Rectangle {
              width: 100; height: 100
              color: "blue"
              anchors.right: parent.right
              anchors.top: parent.top
          }
      
          Menu {
              id: contextMenu
              MenuItem { text: "1" }
              MenuItem { text: "2" }
              MenuItem { text: "3" }
          }
      }
      
      

      Expected result: context menu popup appears on cursor in red rectangle

       

        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
            jirauser65384 user-15860 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes