Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Touchscreen cannot rotate with linuxfb evdevtouch
QtWS25 Last Chance

Touchscreen cannot rotate with linuxfb evdevtouch

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 297 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Edmond.Yu
    wrote on last edited by
    #1

    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.html

    After 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.cpp

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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved