-
-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong input in PyQt6 with tslib #227
Comments
what's the content of your ts.conf? are you sure you use the same environment setting for ts_test and qt (ts_uinput)? |
Here are the contents of ts.conf located in /usr/local/etc/ts.conf
I'm not sure I use the same environment for ts_test and ts_uinput. But I initialize the environment as described before, then run ts_uinput -d -v and in the same terminal window run pyqt app (all these steps are done within the same terminal window). I expected that there's only 1 environment used for all of these, when I calibrate the display using ts_calibrate. Could you please elaborate further on this? What should I do to use the same environment and finally get my input right from ts_uinput? |
I tried to run all the commands to set up the environment before everything else within my pyqt6 app:
And nothing really changes, moreover the input got even more off. Now I cannot even open ComboBox when clicking on it, only by clicking on random locations where it's not there. |
Interesting thing is that even if I change rotation in |
I installed pyqt5 to try if pyqt6.4.3 had problems, but it's all the same, doesn't work either. I reinstalled tslib multiple times with different ways, didn't help. I literally tried all the environment variables for tslib and pyqt I could find on the internet. Nothing works. What I found is that touch input is okay, it's just reversed 90 degrees compared to my current screen orientation. And I cannot rotate this touch at all, nothing helps, idk why. It seems like pyqt5 or 6 doesn't recognize tslib at all, because no matter what I do, even if I don't initialize tslib environment, I get the same input and the same problem in pyqt. What can be wrong? |
Hello. I run compiled tslib on RPi zero 2w. I have an ili9341 2.8inch display with xpt2046 touch. I initialize environment with these parameters:
export LD_LIBRARY_PATH=/usr/local/lib
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb1
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/home/pi/pointercal
export TSLIB_CONFFILE=/usr/local/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/lib/ts
ts_calibrate
I run the ts_test and I get the perfect input.
Then I run ts_uinput -d -v and it generates /dev/input/event1
Then I export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event1:rotate=0
I run the PyQt6 app on linuxfb. I can see that now I can get the touch input more or less working on my display in the PyQT6 app, but it's definitely far from accurate. I cannot click on the items in the bottom of the QComboBox unless I select the middle item and drag down. When I click on items I often get weird behaviour like double clicking. For some reason, I can open combobox by clicking on the place where it's not even there. I also show the virtual keyboard and when I click on one button the totally different one gets clicked. So, I can definitely see that the input is off.
So, what could be a problem and how to solve it? I literally searched everywhere and cannot find a solution. Thank you.
The text was updated successfully, but these errors were encountered: