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

MultiPointTouchArea does not return correct TouchPoint data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: 5.3.1
    • Fix Version/s: None
    • Component/s: Quick: Other
    • Labels:
      None
    • Environment:
      OSX 10.9, running on mid 2012 Macbook Pro
    • Platform/s:
      macOS

      Description

      Observed behavior:
      sceneX and sceneY return identical data as x and y, respectively.
      startX/startY always return 0
      previousX/previousY always return 0

      Expected behavior:
      sceneX/sceneY does not return same data as x/y, respectively. It is not clear from the documentation if x/y should return the coordinates relative to the window, but it seems reasonable that it should be reflecting different values from sceneX/sceneY.
      startX/startY return non-zero data
      previousX/previousY return non-zero data

      A minimal test demonstrating this behavior is here:

      import QtQuick 2.3
       
      Rectangle {
          color: "#666666"
       
          //! [0]
          MultiPointTouchArea {
              anchors.fill: parent
              minimumTouchPoints: 1
              maximumTouchPoints: 1
              mouseEnabled: true
       
              onUpdated: {
                  console.log("x: " + touch11.x + ", sceneX: " + touch11.sceneX + ", startX: " + touch11.startX + ", previousX: " + touch11.previousX);
                  console.log("y: " + touch11.y + ", sceneY: " + touch11.sceneY + ", startY: " + touch11.startY + ", previousY: " + touch11.previousY)
              }
              touchPoints: [
                  TouchPoint {
                      id: touch11
                  }
              ]
          }
          //! [0]
       
          Rectangle {
              id: control1
              width: 14
              height: 14
              color: "#FFFF00"
              radius: 6
              z: 3
              x: touch11.x
              y: touch11.y
              border.color: "#000000"
          }
      }
      

      Note, the documentation might be dated, leading to false expectations. For instance, the pressure property returns -1, which is outside its promised 0..1 range.

        Attachments

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

          Activity

            People

            Assignee:
            srutledg Shawn Rutledge
            Reporter:
            kubark42_ Kenz Dale
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes