This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Qt and Tslib

Hello, all. I have a similar issue with a couple of threads in the forum such as http://e2e.ti.com/support/embedded/linux/f/354/t/249663.aspx

I am using AM335X Starter Kit SDK 07.00.00.00 to run on our board, where we have a Dialogue Inc PenMount USB touchscreen. The device is recognized, and evtest prints logical information for output. However, ts_calibrate and ts_test will complain that the device is not recognized as a touchscreen device. We have received sources for tslib from PenMount, and replaced the tslib binaries with the re-built version. This solved this issue.

However, Qt applications started suffering with QWS_MOUSE_PROTO set to Tslib:/dev/input/touchscreen (where our device is attached). The applications were either crashing, or the mouse cursor was not moving at all.

QWS_MOUSE_PROTO=/dev/input/touchscreen : Neither USB mouse nor the touchscreen move the cursor.

QWS_MOUSE_PROTO=Auto: USB mouse works correctly. Touchscreen does move the cursor, but not in a correct way. Is there a way to provide qt calibration information, other than TSLIB_CALIBFILE?

What would be the suggested solution to this problem? Will re-building Qt help? Is there an easier way to make Qt use the touchscreen properly?

Thanks in advance.

  • Hi,

    Try to cross compile your QT source with "-qt-mouse-tslib" extra flag option.

  • Thanks.

    Though, the same Qt (that comes in the SDK toolchain) works fine for the am335x starter kit touchscreen. It causes an issue with out touchscreen device.

    To re-build qt, which version would you recommend, btw? qt 4.8 embedded? qt 5.3?

  • Hi Faith,

    Though, the same Qt (that comes in the SDK toolchain) works fine for the am335x starter kit touchscreen. It causes an issue with out touchscreen device.

    Could you please elaborate your problem ?

  • Hello.

    For our am335x based board, we are modifying the AM335X Starter Kit SDK 07.00.00.00 sources.

    The issue is:

    - The tslib utilities, namely, ts_calibrate and ts_test, that are in the root file system within the SDK complained about our PenMount touchscreen device not being recognized as such. So, we got a tslib from PenMount, and they worked fine.

    - The Matrix GUI interface or even a simple Qt application does not move the mouse when QWS_MOUSE_PROTO is Tslib:/dev/input/touchscreen. When QWS_MOUSE_PROTO=Auto, touchscreen input does move the mouse but in a wrong way. For the 'Auto' case, is there a way to make Qt move the mouse properly like how ts_test does?

    - If Qt needs to be re-built, is qt5 worth giving a go, or qt 4.8.6 embedded is the better tested option?

    - I did give qt4.8.6 a try following the guide at http://processors.wiki.ti.com/index.php/Building_Qt_with_OpenGL_ES_accelerated_by_SGX, but the build failed complaining that OpenGL functionality test failed, although the instructions were carried out to point to the graphics SDK. Any ideas on this?

    Thanks.

  • Hi,

    Thanks  for your detailed explanations.

    Have you mentioned TSLIB & QWS_MOUSE_PROTO like below in your matrix GUI ?


    export TSLIB_TSDEVICE=/dev/input/touchscreen0
    export QWS_MOUSE_PROTO="Tslib:/dev/input/touchscreen0 Auto"

    3343.matrix-gui-2.0.txt

    6281.touchscr_sh.txt

  • yes

    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/etc/ts.conf
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_PLUGINDIR=/usr/lib/ts
    export TSLIB_TSDEVICE=/dev/input/touchscreen
    export TSLIB_TSEVENTTYPE=INPUT