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

tslib input not working

    XMLWordPrintable

Details

    • f0b2c5f21 (dev), 44df580c8 (6.6), 87b0297ca (tqtc/lts-6.5), 65258e941 (tqtc/lts-6.2)

    Description

      I wish to use tslib as input method for my display. When running the mousebuttons example, I can see the cursor moving, but I am not getting any pressdown events.

      That worked fine in qt5.

       

      Snippet from my configuration log from qtbase:

      Features used by QPA backends:
        evdev .................................. yes
        libinput ............................... no
        HiRes wheel support in libinput ........ no
        INTEGRITY HID .......................... no
        mtdev .................................. no
        tslib .................................. yes
        xkbcommon .............................. yes
        X11 specific:
          XLib ................................. no
          XCB Xlib ............................. no
          EGL on X11 ........................... no
          xkbcommon-x11 ........................ no
          xcb-sm ............................... no

       

      I.e. I got tslib and evdev configured and libinput disabled.

      For testing, I am using the mousebuttons example:

      https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/widgets/mousebuttons?h=6.4.2

       

      Environment variables set upon starting:

      export QT_QPA_EGLFS_TSLIB=1
      export TSLIB_TSDEVICE="/dev/input/touchscreen0"

      export QT_LOGGING_RULES="*=true"

       

      During start of the application:

      qt.qpa.input: Initializing tslib plugin "TsLib" ""
      qt.qpa.input: tslib device is /dev/input/touchscreen0

       

      So tslib is indeed being used.

      Upon pressing the screen, the following is shown (due to debug being enabled):

      qt.qpa.input.devices: no mouse-like devices registered for seat "" The platform plugin should have provided one via QWindowSystemInterface::registerInputDevice(). Creating a default mouse for now.
      qt.pointer.velocity: velocity QVector2D(-176000, -176000) filtered QVector2D(-123200, -123200) based on movement QPointF(176,176) -> QPointF(0,0) over time 4221 -> 4222
      qt.widgets.painting: Syncing QRegion(-7,-2 208x208) of QWidget(0x7edd5ad4)
      qt.widgets.painting: Flushing QRegion(-7,-2 208x208) of QWidget(0x7edd5ad4)
      qt.pointer.velocity: velocity QVector2D(2983.05, 2983.05) filtered QVector2D(2088.14, 2088.14) based on movement QPointF(0,0) -> QPointF(176,176) over time 4222 -> 4281
      qt.widgets.gestures: QGestureManager:Recognizer: ignored the event:  QPanGesture(state=NoGesture,lastOffset=0,0QPointF(0,0),offset=0,0,acceleration=0,delta=0,0) QMouseEvent(MouseMove pos=163,163 scn=176,176 gbl=176,176 dev=QPointingDevice("core pointer" Mouse id=1))
      qt.widgets.painting: Syncing QRegion(-12,-12 208x208) of QWidget(0x7edd5ad4)
      qt.widgets.painting: Flushing QRegion(-12,-12 208x208) of QWidget(0x7edd5ad4)
      qt.text.hittest: checking frame 0 point= QPointF(165,165) position QPointF(0,0) size QSizeF(774, 56)
      qt.text.hittest:     checking block 0 point= QPointF(165,165)     tlrect QRectF(4,4 766x24)
      qt.text.hittest:     after pos= 56
      qt.text.hittest:     checking block 56 point= QPointF(165,165)     tlrect QRectF(4,28 766x24)
      qt.text.hittest:     after pos= 102
      qt.text.hittest: inside= 1  pos= 102

       

      tslib works fine outside qt. Adding prints inside readMousedata in qtslib.cpp (https://code.qt.io/cgit/qt/qtbase.git/tree/src/platformsupport/input/tslib/qtslib.cpp?h=6.4.2) also shows correct functionality, i.e. detects proper x and y coordinates and pressdown events.

       

      Made another test, where I used a simple qml test file:

      import QtQuick 2.12
      import QtQuick.Window 2.12

      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")

          Rectangle {
              color: "red"
              x: 100
              y: 100
              width: 200
              height: 200
              MouseArea {
                  anchors.fill: parent
                  onPressed: {
                      console.log("pressed")
                  }
              }
          }
      }

       

      When starting that using qmlscene and pressing the screen afterwards gives an error:

      "qt.quick.mouse: mouse grabber ambiguous: no event is currently being delivered"

       

      Attempted to read through the log since qt5, and seems like quite a lot have happened. To be, it looks like a missing handler.

       

      Worked in qt5. Tested with qt6.2.4 and qt 6.4.2 and none of those works.

      Attachments

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

        Activity

          People

            sapiippo Samuli Piippo
            cbs chbs@prevas.dk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes