Qt5 Raspbian eGalax Failing touchscreen interaction



  • Hiya!

    I just registered, and of course, I have a problem. I hope someone can give me a hint!

    I have a Raspberry Pi which runs Qt5 just awesomely. I want to make simple touch apps to showcase this.
    The touchscreen works just fine in X11, but i can't get any Qt5 apps to take the input from the touchscreen.
    Keyboard and mouse work just fine, but if you touch the screen the actual input goes straight through the Qt5 app and interacts with whatever is behind it, the X11 Desktop environment.

    Mind you; I just want the point and click experience, not multitouch (since it is a simple 2 wire resistive screen).

    Does anyone have experience with this behavior? I hope it's something trivial.

    Thanks in advance!



  • I have the same problem with a General Touch touchscreen, but i can't solve it.



  • Have you tried launching the app directly from the command line without loading a desktop or window manager?



  • In my case, qt app continues ignoring touchscreen events



  • Now I'm having the exact same problem as you are. I'm using a capacitive touchscreen with n-trig drivers. The touchscreen works fine on the desktop. But when I'm using the eglfs platform plugin for Qt, the touch events are passing through to the desktop.



  • Solved: When the app is launched you can pass -plugin evdevtouch:/dev/input/event[insert event number of your touchscreen here]

    If you need to find which event is the touchscreen just cd into /dev/input and type "ls" to display all the events.

    Than type "cat event[insert number]" for each one and touch the touchscreen, when you see illegible text being displayed, you've found the touchscreen.



  • I`ve followed instructions but qt app ignore touchscreen events.

    Could be a calibration problem?



  • Do you get a message in the Qt terminal about using evdevtouch with your touchscreen right after you launch the app?

    [quote author="migsada" date="1358780864"]I`ve followed instructions but qt app ignore touchscreen events.

    Could be a calibration problem?[/quote]



  • I launch qt app directly, without loading windows manager (startX), and it shows this:

    evdevtouch: Using device /dev/input/event0
    min X:0 max X:0
    min Y:0 max Y:0
    min pressure: 0 maxpressure: 0
    device name: HID 04e7:0020
    protocol type A



  • Reading the evdevtouch plugin readme, it looks like single touch devices that only pass the absolute value of x and y are not supported.

    The readme says to try tslib or evdevmouse instead.

    Try passing the same paramters but replace evdevtouch with tslib and evdevmouse instead.

    Here is the readme if you want to check it out.

    http://qt.gitorious.org/qt/qtbase/blobs/bb4e8e37d2934147c3654d25c6688bb24f30a2f2/src/plugins/generic/evdevtouch/README



  • Thank you learc83, with evdevmouse works.



  • Is there any possibility to calibrate evdevmouse?



  • Hi
    I am working on touch based Qt appliction in raspberry pi.
    after running my Qt app touch screen cannot respond. It shows error on qt app terminal like "evdevtouch: Could not read from input device (No such device) "
    i will try the plugin s
    -plugin evdevmouse:dev/input/event1
    -plugin tslib:dev/input/event1 cannt work for me

    but when i used the -plugin evdevtouch:dev/input/event1 it shows
    evdevtouch: Invalid ABS limits behaviour unspecified

    please give me any suggestions



  • Your touchscreen is definitely event1? Is your touchscreen multitouch? Does it work outside of Qt?



  • My touch screen is egalax 7 inch touch screen i check the touch scrren event i.e is 1 only



  • Is it working outside of Qt, that is can you use it in Raspbian or whatever OS you're using?

    Looking through the Qt source code the warning you're getting is caused when the touchscreen doesn't respond correctly to a system call asking for the minimum and maximum of the x y values.

    If that is the case then I'm not really sure what you can do about it.

    There was, however, a fairly recent patch to this system call in the source code. Are you running the latest version of Qt5?



  • I also found another person using your touchscreen who got it to work with tslib instead of evdevtouch.

    http://qt-project.org/forums/viewthread/24199



  • Yep i am using raspbian os and Qt5.
    Is it posible to rut Qt5 apps with this egalax touchscreen.
    If it is working please guide me, i was struck from last 5 days.



  • I haven't used a egalax touchscreen so I don't know. However the person on the thread I posted above seemed to be able to get one working With Qt5 using tslib.



  • PING
    I uses actually an eGalax 7" Touchscreen. Touch input inside of the QT Application is done by TSLIB, but an interaction with the desktop in the background is still there ... why ??? is there a way to fix this ?

    Regards

    Sebastian


Log in to reply
 

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