Important: Please read the Qt Code of Conduct -

QT Widgets not responding to touch event sometimes

  • Hi ,

    I'm facing weird behavior with Qt touch events with widgets. The touch is not working with widgets sometimes.
    I'm using Qt 5.6.2 and developed one application with some widgets (3 QComboBox and submit buttons). I have enabled tslib while compiling and it got compiled successfully.

    After running application I can control all the widgets with touch. Then after sometime all widgets will stop responding to touch. Again after sometime it may respond. When the touch is not working, at that time the mouse click is working fine. And also I confirmed mouse is working fine always.

    If I rerun the Qt application, again touch will work for sometime.

    I have confirmed ts_calibrate and ts_test are working fine. It is working continuously.

    I have set below variables to run the Qt app with touch-

    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/etc/ts.conf
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/event0
    export TSLIB_PLUGINDIR=/usr/lib/ts/
    export QT_QPA_PLATFORM_PLUGIN_PATH=/plugins
    export QT_QPA_PLATFORM=linuxfb
    export QWS_MOUSE_PROTO=/dev/input/event0

    And I'm running application as -
    ./qt_app -plugin tslib

    Is anyone faced this issue? And how to solve this?


  • Qt Champions 2017

    When you said after some time what does it mean ? Are you in the same UI where it responded for touch earlier ?. Say some UI displayed and same UI e.g after 10 seconds stops responding to touch ? Or are you going to different UI and that UI stops responding ?

    In order to isolate the issue, Can you just have some simple one widget & start looking for the touch events ? Since you said that mouse events are coming, I don't see issue with event processing.

  • Hi @dheerendra ,

    I have only one ui and same only working for sometimes and stops.
    The time it works is random. Sometimes it works more time and stops. And sometimes it will start working again.

    I believe the issue is the widgets with touch. Because whenever the widgets not responding, I can see the mouse cursor is moving properly whenever I'm touching.

    I created a simple ui and tried. There also I can see the same issue.

  • Qt Champions 2017

    Hard to figure out what is the issue. I tried with our board we are not seeing the same behaviour. If it is failing with Qt widgets, can you check with QML application. It is just to eliminate the possibilities.

  • Hi
    I am facing the touch issue in QML.
    Whenever I tried to random clicks on my UI sometimes am getting Invalid touch state in command promt while testing on my hardware.