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

Can't get Tslib working with eglfs in Qt5.2



  • Hi everyone

    I've been trying for a few days to enable my apps to use tslib instead of evdev on my BeagleBone Black, but wasn't successful yet.
    This is what I did:
    1- Cross-compiled tslib and tested it on my board, everything works fine with ts_calibrate and ts_test. All environment variables set, everything good!
    2- I configured and cross-compiled Qt 5.2.1 from source using -tslib switch. Got the tslib plugin module in the plugin directory. Compiled my apps, all running good.
    3- Now the difficult part is that I tried almost all environment variables and command-line switches on my app. Seems that Qt totally disregards anything related to tslib. The module simply doesn't load. I have the touch input functionality but it's not perfect using the built-in evdev in eglfs. So I have to switch to tslib. Tried https://www.marshut.net/ikqnuu/touch-screen-events-seem-opposite-in-qt5-2.html but it disables the touch input altogether.

    Any idea how to get tslib to work with eglfs?

    Thanks in advance.


  • Lifetime Qt Champion

    Hi,

    You should start your application with QT_DEBUG_PLUGINS set to 1 to see what might be failing when you run it



  • Many thanks SGaist. That was a great start. Seems that my app can't find the tslib library file:

    @
    QLibraryPrivate::loadPlugin failed on "/usr/local/qt-5.2/plugins/generic/libqtslibplugin.so" : "Cannot load library /usr/local/qt-5.2/plugins/generic/libqtslibplugin.so: (libts-1.0.so.0: cannot open shared object file: No such file or directory)"
    @

    However I did add the library path to my .pro file:

    @
    QMAKE_LIBDIR += /usr/local/tslib/lib/
    QMAKE_LFLAGS += -L/usr/local/tslib/lib/ -Wl,-rpath-link=/usr/local/tslib/lib/
    LIBS += -L/usr/local/tslib/lib/
    @

    I can get around this issue by just copying libts-1.0.so.0 to /usr/lib. But it would be nice to know what's wrong here.



  • SGaist, I am also trying to calibrate my touch screen with the beagle bone black. In my case, I am not using any desktop enviornment and instead using concole based ubuntu. When I am trying to run "ts_calibrate" or "ts_test", I am getting error "ts_open: no Such file or directory" and "/dev/touchscreen/ucb1x00: No such file or directory". Can you guide me, how i can solve these issues?. Thanks


  • Lifetime Qt Champion

    AFAICS, you are trying to open a device that's not present on your system. You should first find the right device name for your touch device to configure tslib.


Log in to reply