[SOLVED] problem with Qt and tslib
-
I corrected ts.conf file path in TSLIB_CONFFILE variable. It was pointing to a wrong place. Although it didn't solve my problem!
Ok. How to calibrate tslib? When I run ts_calibrate binary file in the target terminal nothing happens. First question: Is it normal?
Second: Do I have to edit some header or config file to calibrate tslib instead of running ts_calibrate? -
You should see a calibration GUI appearing on your device's screen
No header needed, the calibration process of tslib generate the configuration files you'll use later on
-
Well that's another problem. When I type ts_calibrate it says in terminal :
@tslib: Selected device is not a touchscreen (must support ABS_X and ABS_Y events)@
And a GUI shows up but it doesn't accept my finger when I touch that spot I'm supposed to touch.
Any Idea?Less important question!: Why do I have to calibrate it anyway?
-
What touchscreen are you using ?
For the less important question:
Different hardware setup ? -
Fair enough !
I'm pretty sure it's: ft5x0x_ts
I saw it by "cat /proc/bus/input/devices"Can I edit tslib sources so it wouldn't give that error?
-
IIRC, there was a catch between that device and tslib, I don't rememberer all the details, but if you search for the two together you should find some infos.
-
You mean on this site?
Cause I didn't find very helpful information on net. Seems like other people have or had the same problem too but nobody posted something useful. -
SGaist I have another question. Is there an alternative to tslib?
I mean say I never gonna make it with tslib, do I have other options to work with touch screen inside a Qt program?
What about Qt5? I was reading this page http://doc-snapshot.qt-project.org/qt5-dev/embedded-linux.html and seems like Qt5 has some options for new multitouch controllers.
Another question: How do I know if my board supports Qt5 versions? Can I cross compile a Qt-everywhere-5.2.1 just like the way I did for Qt-everywhere4.7.0 and copy lib folder and stuff? -
IIRC, Qt 5 has the evdev plugin in addition to also support tsllib.
What board are you using ?
Basically yes, depending on your needs you might have to provide additional libraries in order to fully build Qt 5.
-
Dear SGaist I managed to get tslib to work with touch screen controller by modifying controller driver in kernel. Now I can run ts_calibrate successfully and everything seems to be fine.
But still Qt doesn't take touch actions. I tried to compile Qt again with some modifications in qmake.conf like:
QMAKE_INCDIR +=
QMAKE_LIBDIR +=
QMAKE_CFLAGS += -I
QMAKE_LFLAGS += -L
Respectively pointing to tslib Header and Lib directory. But still I can not use touch as an input to compiled Qt demo programs.
I added -qt-mouse-tslib and -plugin-mouse-tslib into configure.
I've set all necessary environmental variables for Qt and tslib.Please help me. I got too excited after solving controller's problem but now I'm stuck at a point all over again.
-
It's not a build problem.
tslib is used in a plugin. You have to configure your application to start using the plugin
-
Yeah I kind of have the feelings that it has something to do with the environment variables and things like that. But I went based on this page:
http://qt-project.org/doc/qt-4.7/qt-embedded-pointer.html
Then I don't know what is wrong.
Any specific idea? -
Since you talked about both Qt 4 and 5, which version are you currently using ?
-
Ok I figured there was some problems with environment variables. Apparently device name is something else. Now it seems it's working.
By the way I meant Qt4.