Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT5.4.1 application doesn't respond to touch while evtest reports correct x,y



  • Hi,

    I am using Qt5.4.1 on Arm cortex A8 Linux based platform. I have connected a 800x480 capacitive touch screen.
    evtest reports correct x,y co-ordinates if I touch on all four corners but Qt app doesn't detect touch.

    I have tested my Qt app on a different touch device and it works.

    What else could be the reason for it not to work ?

    thanks
    Ankur


  • Lifetime Qt Champion

    Hi,

    What plugin are you using for input ?





  • Hi,

    @Qt-Champions-2015
    I have built Qt to use eglfs and eglfs has all the evdev input handling code built-in.

    @Leonardo
    I am using a capacitive touch screen based on FT5x06. As per documentation, I don't need tslib.
    Do you have any other rationale for using tslib ?

    regards
    Ankur



  • You shouldn't need it, but the truth is that sometimes tslib is the only one to work. In addition, I have already had the same problem with the same capacitive touch and Qt version.



  • So in order to override inbuilt evdev support for eglfs platform, I should build Qt with tslib support and set QT_QPA_EGLFS_TSLIB and TSLIB_DEVICE in environment ?



  • Yes. It's also possible to use a command line argument. Here's the shell script I use to launch my application:

    #!/bin/sh
    dirname=`dirname $0`
    tmp="${dirname#?}"
    if [ "${dirname%$tmp}" != "/" ]; then
    dirname=$PWD/$dirname
    fi
    LD_LIBRARY_PATH="$dirname:/lib:/usr/lib:/usr/local/lib"
    QT_QPA_PLATFORM="eglfs"
    QT_QPA_EGLFS_DISABLE_INPUT=1
    TSLIB_TSDEVICE=/dev/input/event1
    QT_QPA_EGLFS_HIDECURSOR=1
    export LD_LIBRARY_PATH
    export QT_QPA_PLATFORM
    export QT_QPA_EGLFS_DISABLE_INPUT
    export TSLIB_TSDEVICE
    export QT_QPA_EGLFS_HIDECURSOR
    $dirname/application -plugin tslib


  • Thanks Leonardo, using Qt with Tslib fixed the problem.


Log in to reply