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

Quick DragHandler Reporting Wrong Coordinates using TouchScreen Input

    XMLWordPrintable

Details

    • Windows
    • d08038ba70 (qt/qtdeclarative/dev) d08038ba70 (qt/tqtc-qtdeclarative/dev) ee68d19b1d (qt/qtdeclarative/6.3) ee68d19b1d (qt/tqtc-qtdeclarative/6.3) cf39c6e28d (qt/qtdeclarative/6.2) cf39c6e28d (qt/tqtc-qtdeclarative/6.2) cf39c6e28d (qt/qtdeclarative/6.2.4)

    Description

      In the following code, figure dragging reports wrong x and y coordinate values when display scaling is set to something else than 100%.

      import QtQuick
      import QtQuick.Window
      
      Window {
          width: 600
          height: 600
          visible: true
          
      Rectangle 
         {
             x: 300
             y: 300
             color: "red"
             radius: 50
             width: 30
             height: 30
         }
      
          Text {
              text: handler.centroid.position.x.toFixed(1) + "," + handler.centroid.position.y.toFixed(1)
          }
      
          DragHandler {
              id: handler
              target:null
          }
      }
      

      How to reproduce
      1. Set screen scaling to e.g. 200%
      2. Use QTBUG97185.zip
      3. Touch the red circle -> This outputs around 300, 300
      4. Drag towards the red circle -> This outputs e.g. 542, 553 as if it's dragging towards x:600 y:600

      What is known

      • Not reproducible in Qt5.12 and Qt5.15
      • Mouse dragging works fine
      • Touching and untouching produces correct coordinate values

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              nagrohn Nahomi Gröhn (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews