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

Coordinates for tablet input events are limited to integer precision

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.2.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 11 on Hp Envy X360
    • Platform/s:
      Windows

      Description

      I've tested this on Windows 11 with Qt 6.2.1 (using 100% scaling). The coordinate events for tablet input are limited to integer precision. The code I've tested is the following:

       

      import QtQuick 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          PointHandler{
              acceptedPointerTypes: PointerDevice.Pen
              onPointChanged: {
                  if(active){
                      console.debug(point.position, point.scenePosition)
                  }
              }
          }
      }
      

      The output of this code with a stylus looks like this:

       

      qml: QPointF(653, 485) QPointF(653, 485)
      qml: QPointF(653, 485) QPointF(653, 485)
      qml: QPointF(652, 483) QPointF(652, 483)
      qml: QPointF(652, 483) QPointF(652, 483)
      qml: QPointF(652, 480) QPointF(652, 480)
      qml: QPointF(652, 480) QPointF(652, 480)
      qml: QPointF(652, 478) QPointF(652, 478)
      qml: QPointF(652, 478) QPointF(652, 478)
      qml: QPointF(652, 476) QPointF(652, 476)
      qml: QPointF(652, 476) QPointF(652, 476)
      qml: QPointF(653, 475) QPointF(653, 475)
      qml: QPointF(653, 475) QPointF(653, 475)
      qml: QPointF(654, 473) QPointF(654, 473)
      qml: QPointF(654, 473) QPointF(654, 473)
      qml: QPointF(655, 472) QPointF(655, 472)
      qml: QPointF(655, 472) QPointF(655, 472)
      qml: QPointF(658, 471) QPointF(658, 471)
      qml: QPointF(658, 471) QPointF(658, 471)
      qml: QPointF(660, 469) QPointF(660, 469)
      qml: QPointF(660, 469) QPointF(660, 469)
      qml: QPointF(663, 468) QPointF(663, 468)
      qml: QPointF(663, 468) QPointF(663, 468)
      qml: QPointF(667, 466) QPointF(667, 466)
      qml: QPointF(667, 466) QPointF(667, 466)
      qml: QPointF(672, 464) QPointF(672, 464)
      qml: QPointF(672, 464) QPointF(672, 464)
      qml: QPointF(679, 461) QPointF(679, 461)
      qml: QPointF(679, 461) QPointF(679, 461)
      qml: QPointF(686, 459) QPointF(686, 459)
      qml: QPointF(686, 459) QPointF(686, 459)
      qml: QPointF(693, 458) QPointF(693, 458)
      qml: QPointF(693, 458) QPointF(693, 458)
      qml: QPointF(700, 457) QPointF(700, 457)
      qml: QPointF(700, 457) QPointF(700, 457)

      I also tested the tablet example here [Tablet Example | Qt Widgets 6.2.1|https://doc.qt.io/qt-6/qtwidgets-widgets-tablet-example.html] and QDebug reports coordinate events with precision up to three decimal places. I would have expected the same level of precision in Qt Quick.

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            daljit97 Daljit Singh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes