Touchscreen cannot rotate with linuxfb evdevtouch

  • 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:

    After hook the QEvent as the following:

    bool MainWindow::eventFilter(QObject *obj, QEvent *event)
            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:


    I haven't digged into the source code qevdevtouchhandler.cpp.

    Please give me ideals to fix the issue. I have struggled and searched for several days

Log in to reply