QT5 and tslib



  • I have successfully built and run a QtQuick 1 application on my hardware. The problem is that I cannot get the touch screen to work. I have built the tslib plugin (with debug code enabled). When I run the app with ./qml-app -platform linuxfb -plugin Tslib it executes and if I touch the touch screen I can see valid coords being reported by the tslib plugin:

    handleMouseEvent 430 164 1 614966
    handleMouseEvent 461 162 1 614966
    handleMouseEvent 481 160 1 628606
    handleMouseEvent 512 157 1 635419
    handleMouseEvent 543 154 1 642244

    The problem is nothing happens, the app does not see mouse events.

    Is QWindowSystemInterface::handleMouseEvent not working?

    Pierre



  • Did you set the enviroment variables to use the touch screen?

    export QWS_MOUSE_PROTO=tslib:/dev/input/ts0 or
    export QWS_MOUSE_PROTO=tslib:/dev/input/event0

    touch screen related to info in this "link":https://community.freescale.com/thread/253060 might help you.


  • Moderators

    That will not work with Qt5: QWS is no more.



  • Sorry! i missed that point. QWS is before 5.0.2, now it is QPA. I am not much tried with qt 5 using ts lib.

    this "link":http://gpupowered.org/node/8 suggested below. may be this helps
    @Tslib support:

    Apply this patch - https://github.com/prabindh/qt-configs/blob/master/qt5_1.0_Feb13/tslib.p... - refer to http://tigraphics.blogspot.in/2013/03/correct-tslib-operation-with-qt5-o... for correct usage.

    tslib (or other input plugins) is NOT built by default, need to do below steps (ensure tslib.h is present in standard /usr/include folders)

    cd qtbase/src/plugins/generic/tslib
    make && make install

    The above step will generate and install "libqlinuxinputplugin.so" into plugins folder which will be detected by Qt5. The tslib plugin is invoked as below:

    -platform eglfs -plugin Tslib

    For other input devices (udev based), evdev* projects need to be built, and are present in the qtbase/src/plugins/generic/ folder.@



  • I have seen the above previously and I have built the tslib plugin. The problem is the tslib plugin is getting the touch events and handing them off to QWindowSystemInterface::handleMouseEvent.
    As you can see from the original post I'm using platform linuxfb. Is it failure to handle the mouse events caused in the platform code (linuxfb plugin) perhaps?



  • I have the same problem on a beablebone with platform linuxfb . There's a solution?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.