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

Touchscreen press(down) events appear with a delay

    XMLWordPrintable

Details

    • Linux/X11

    Description

      Dear Qt team,
       
      I discovered a touch input problem with QtQuick (qml) in Qt 5 and Qt 6 on Ubuntu. Press(down) events appear with a delay of ~170ms in Qt. The weird thing is, that release(up) and click events are working as expected. Only press(down) has this delay. To exclude a system/hardware problem I checked the logs from xinput, press events have no delay there.
       
      The problem appears in PySide2, PySide6 and qmlscene (Qt 5 and Qt 6). I did not check older versions.
       
      I used different types of Iiyama touch screens (e.g. IIYAMA PROLITE TF2415MC-B2).
       
      How to reproduce the problem:

      • Connect a touchscreen to your Ubuntu system (20.04.3 LTS)
      • Download the online installer for Ubuntu and install Qt 6.2.0
      • Install moreutils to add time stamps to xinput outputs:
        sudo apt install moreutils
      • Create a qml file with (main.qml):
        import QtQuick 2.2
        import QtQuick.Window 2.2
        
        Window {
            title: "test"
            width: 800
            height: 600
            visible: true
        
            Rectangle {
                anchors.fill: parent
                color: "blue"
            }
        }
        
      • Start the Qt application with qmlscene: QT_LOGGING_RULES="qt.quick.touch=true" QT_MESSAGE_PATTERN="%{time hh:mm:ss.zzzzzz}: %{message}" qmlscene main.qml
      • Start xinput logging to proof the delay (check xinput list to get the ID of your touch device):
        xinput test 10 | ts '%H:%M:%.S'
      • Press the blue Qt window
      • Output qmlscene:
      15:45:01.999999: QQuickDeliveryAgent(root=QQuickRootItem) QTouchEvent(TouchBegin device: "eGalax Inc. eGalaxTouch EXC3188-4623-09.00.00.00" states: Pressed, 1 points: QList(QEventPoint(id=133 ts=93229220 pos=461.982,384.642 scn=461.982,384.642 gbl=1169.98,658.642 Pressed vel=0,0 press=461.982,384.642 last=461.982,384.642 \u0394 0,0)))
      15:45:04.004004: QQuickDeliveryAgent(root=QQuickRootItem) QTouchEvent(TouchEnd device: "eGalax Inc. eGalaxTouch EXC3188-4623-09.00.00.00" states: Released, 1 points: QList(QEventPoint(id=133 ts=93231399 pos=461.982,384.642 scn=461.982,384.642 gbl=1169.98,658.642 Released vel=0,0 press=461.982,384.642 last=461.982,384.642 \u0394 0,0)))
      • Output xinput:
      15:45:01.825381 motion a[0]=39935 a[1]=39967 
      15:45:01.825792 button press   1 a[0]=39935 a[1]=39967
      15:45:04.004288 motion a[0]=39935 a[1]=39967 
      15:45:04.004419 button release 1 a[0]=39935 a[1]=39967 

       
      You will see the delay of press events the terminal outputs
       
      Please let me know if this problem could be solved.
       
      Thank you.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            neelz Nils Gründl
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes