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

PointerHandler is `onPointChanged` emmiting information twice

    XMLWordPrintable

Details

    • Linux/X11

    Description

      I saw this on a Linux laptop that had a built in pen/touch screen (X1 Carbon Yoga laptop).  Using a stylus, I had this setup:

      PointHandler {
        id: pen_point_handler  acceptedDevices: PointerDevice.Stylus
        acceptedPointerTypes: PointerDevice.Pen  onPointChanged: {
          // Log info about the point that's been pressed
          var id = pen_point_handler.point.id;
          console.log("Pen");
          console.log(" id: " + id);
          console.log(" uid: " + pen_point_handler.point.uniqueId);
          console.log(" pos: " + pen_point_handler.point.position);
          console.log(" pressure: " + pen_point_handler.point.pressure);
          console.log(" rotation: " + pen_point_handler.point.rotation);
          console.log("----");
        }
      }
      

       

      Output on the console looked like this:

      qml: Pen
      qml:  id: 0
      qml:  uid: QPointingDeviceUniqueId(1002769070)
      qml:  pos: QPointF(754.538, 339.569)
      qml:  pressure: 0.4407806396484375
      qml:  rotation: -180
      qml: ----
      qml: Pen
      qml:  id: 0
      qml:  uid: QPointingDeviceUniqueId(1002769070)
      qml:  pos: QPointF(754.538, 339.569)
      qml:  pressure: 1
      qml:  rotation: 0
      qml: ----
      qml: Pen
      qml:  id: 0
      qml:  uid: QPointingDeviceUniqueId(1002769070)
      qml:  pos: QPointF(756.772, 339.693)
      qml:  pressure: 0.3406524658203125
      qml:  rotation: -180
      qml: ----
      qml: Pen
      qml:  id: 0
      qml:  uid: QPointingDeviceUniqueId(1002769070)
      qml:  pos: QPointF(756.772, 339.693)
      qml:  pressure: 1
      qml:  rotation: 0
      qml: ----
      qml: Pen
      qml:  id: 0
      qml:  uid: QPointingDeviceUniqueId(1002769070)
      qml:  pos: QPointF(758.82, 339.942)
      qml:  pressure: 0.25372314453125
      qml:  rotation: -180
      qml: ----
      qml: Pen
      qml:  id: 0
      qml:  uid: QPointingDeviceUniqueId(1002769070)
      qml:  pos: QPointF(758.82, 339.942)
      qml:  pressure: 1
      qml:  rotation: 0
      qml: ----
      qml: Pen
      qml:  id: 0
      qml:  uid: QPointingDeviceUniqueId(1002769070)
      qml:  pos: QPointF(760.186, 340.252)
      qml:  pressure: 0
      qml:  rotation: -180
      qml: ----
      qml: Pen
      qml:  id: 0
      qml:  uid: QPointingDeviceUniqueId(1002769070)
      qml:  pos: QPointF(760.186, 340.252)
      qml:  pressure: 1
      qml:  rotation: 0
      qml: ----
      

      For each point that was being registered, I'm getting second one that has its pressure information set to `1`.
       
      When I had the `PointHandler` only accept touch screen (finger presses) and mouse input, I wasn't getting these double-emits for each point.
       

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            define-private-public Ben S
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes