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

Text inside MultiPointTouchArea has invalid coordinates on touch events

    XMLWordPrintable

Details

    • Linux/X11, Windows
    • 664f986571 (qt/qtdeclarative/dev) 664f986571 (qt/tqtc-qtdeclarative/dev) 25596acc84 (qt/qtdeclarative/6.3) 25596acc84 (qt/tqtc-qtdeclarative/6.3) fa3de804cb (qt/tqtc-qtdeclarative/5.15)

    Description

      Hi,

      I'm facing an issue on the MultiPointTouchArea since I move from Qt5.8.0 to Qt5.12.1.

      I've got a lot of nested Items that contains Text elements in a MultiPointToucheArea. Before the update, when I hit my touch screen the coordinates were the screen coordinates of my container. Now, on Text elements, my coordinates are relatives to the top left of the Text element and not the container.

      Here is a code sample that reproduce the issue:

      Item {
          id:  root
          width : 600
          height : width
          MultiPointTouchArea {
              anchors.fill : parent
              onPressed: console.log(touchPoints[0].x +" " + touchPoints[0].y)
              Text {
                 anchors.centerIn: parent
                 text : "test !!!!!"
                 color : "white"
              }
              Rectangle {
                  width : 100
                  height : width
                  anchors.horizontalCenter: parent.horizontalCenter
                  anchors.bottom:parent.bottom
                  color :"red"
              }
          }
      }

       

      Note that the issue is only present with tactile interactions, with mouse everything works fine.

      Thank you,
      Olivier.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            oliv-thales Olivier HENRY
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes