Qt-Wayland: Touch input behaving wonky.
I have cross-compiled Qt 5.12 with Wayland and tslib.
After placing everything on my embedded board, I calibrated my touchscreen using ts_calibrate. My touchscreen is MCT101HDMI-A-RTP and it is recognized as /dev/input/event2
I can confirm that when running ts_test that the cursor follows my finger nicely as I move it around the touchscreen.
Once I knew that I calibrated my touchscreen for tslib, I decided to try using it for Qt.
I have the following environment variables set when running the example:
I then launch the an example Qt Wayland compositor like so:
/usr/local/Qt-5.12.0/examples/wayland/minimal-qml/minimal-qml -plugin tslib
I then begin to trace my finger across the screen. Weirdly enough, the cursor seems to jump between where my finger is and another random location. I can confirm this behavior exists when running other examples of wayland. Even when I launch applications using the -wayland platform flag, the touchscreen is still wonky on them as well.
I also noticed that if I pressed quickly, the cursor starts where my finger was, jumps to a random location, and then returns back to where my finger was when I lift my finger off. If I just hold my finger in place for several seconds, I can watch as the cursor jumps between my finger and this random location. Definitely weird.
Does anyone have any suggestions?
I figured out my issue.
I set the following environment variable:
Of course, the cursor dissapears, but when pressing around my Gui running on the Compositor I'm not noticing any buttons being pressed except when I press in them, so that's definitely preferred to a wonky cursor!