Touchscreen cannot rotate with linuxfb evdevtouch
Unsolved
Mobile and Embedded
-
I'm using QT 5.11 on Raspbian GNU/Linux 10 (buster),
The display is rotated but the touchscreen cannot rotate by the following startup parameters:pi@raspberrypi:~ $ export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS="rotate=270" pi@raspberrypi:~ $ ./ucapp -platform linuxfb -plugin evdevtouch
Refer the document:
https://doc.qt.io/qt-5/embedded-linux.html
https://doc.qt.io/qt-5/inputs-linux-device.htmlAfter hook the QEvent as the following:
bool MainWindow::eventFilter(QObject *obj, QEvent *event) { if(event->type()==QEvent::HoverMove) { auto e = (QHoverEvent*) event; auto p = e->pos(); qDebug()<<"rx "<<p.rx() <<";ry "<<p.ry()<<"\n"; } return QMainWindow::eventFilter(obj, event); }
There are two line messages when I touch the left-top point on touchscreen.
It seems one for original point and one for transformed point.09-29 07:52:25 Debug: rx 39 ;ry 767 09-29 07:52:25 Debug: rx 19 ;ry 65
when I set rotate=0, there is only one line message for one touch:
export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS="rotate=0",
I haven't digged into the source code qevdevtouchhandler.cpp.
https://github.com/qt/qtbase/blob/dev/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cppPlease give me ideals to fix the issue. I have struggled and searched for several days