Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

touch events in linux using Qt

Tags:

linux

touch

qt

I am trying to program touch events in linux using Qt. My touch screen works, however when I touch the screen I get mouse events rather than touch events. The mouse cursor moves to where I touch the screen. I don't know if it is a Qt problem or something that happens at the OS level.

I am using Qt 5.4.0 on Debian Jessie.

like image 891
Yaron Cohen-Tal Avatar asked Feb 19 '15 10:02

Yaron Cohen-Tal


1 Answers

Since you did not share any source code, its hard to know what happens wrong on your side. Take a look at this documentation:

  • Detailed Description of QTouchEvent Class
  • Touch Input Examples

All that examples works well, and you need to test it on your side. If it will not work for you, it means that there are some problems on your side, otherwise, it mean that you forgot something in your application (like Qt::WA_AcceptTouchEvents attribute set, or not set to true the acceptTouchEvents attribute at graphics items...).

like image 171
tro Avatar answered Nov 16 '22 01:11

tro