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. Qt 5.10.1 EGLFS libinput Touchscreen rotation
QtWS25 Last Chance

Qt 5.10.1 EGLFS libinput Touchscreen rotation

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
raspberryeglfslibinputtouchscreen
5 Posts 2 Posters 4.5k 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.
  • C Offline
    C Offline
    chtioub
    wrote on last edited by
    #1

    Hi,

    I try to do my first development on Rapsberri PI 3 and Qt.
    I use Qt 5.10.1 with cross compilation for Raspberry 3
    I have a 7" LCD with USB touchscreen rotate a 90°.

    I found the solution to rotate the screen with config.txt adding :
    display_hdmi_rotate=3

    and the touchscreen is rotated with adding call a batch script in
    ~/.config/lxsession/LXDE-pi/autostrart
    the script is :
    xinput set-prop 'FocalTech Lab FTxxxx MultiTouch' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1

    So the touchscreen is working in startx

    My problem is with programs in Qt using EGLFS and libinput. I can not rotate my touchscreen.
    I read a lot a post talking about wayland, tslib, ts_calibrate, evdev.... But I think it is for old development.
    I am pretty sure there is a simple solution for nowadays.

    Sébastien

    1 Reply Last reply
    0
    • C Offline
      C Offline
      chtioub
      wrote on last edited by
      #2

      Hi,

      Can someone help me about this issue.

      3 month I turn around and do not understand why I cannot rotate touch screen only with Qt application.

      Thanks

      DiracsbracketD 1 Reply Last reply
      0
      • C chtioub

        Hi,

        Can someone help me about this issue.

        3 month I turn around and do not understand why I cannot rotate touch screen only with Qt application.

        Thanks

        DiracsbracketD Offline
        DiracsbracketD Offline
        Diracsbracket
        wrote on last edited by
        #3

        @chtioub
        Have a look at:
        https://doc.qt.io/qt-5/embedded-linux.html

        Since you have a multitouch panel it seems, you can use the evdevtouch plugin:

        export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/touchscreen
        

        Replace /dev/input/touchscreen by /dev/input/eventX with the correct value for X if you haven't setup a udev rule yet.

        The same with rotation:

        export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/touchscreen:rotate=90
        
        1 Reply Last reply
        2
        • C Offline
          C Offline
          chtioub
          wrote on last edited by
          #4

          @Diracsbracket said in Qt 5.10.1 EGLFS libinput Touchscreen rotation:

          QT_QPA_GENERIC_PLUGINS

          ouch !

          3 months to turn around, and with 3 lines, you solve my problem !
          Many thanks.

          Now I would like to understand a little why I cannot use libinput as it is the native driver for ELGFS.

          This are no solution with libinput ?
          I trough evdev was an old solution

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chtioub
            wrote on last edited by
            #5

            Hi,

            Well, evdevtouch plugin seem to be completely buggy.
            The rotation woks very well but afin 1 to 10 secondes, the touch does not woks anymore.
            Even with example programs.

            I have this information :
            TouchPointPressed without previous release event QQuickEventPoint(accepted:false state:Pressed scenePos:QPointF(249.631,798.957) id:2000002 timeHeld:0)

            I have to reset the application to work.

            Is there any solution to workaround this bug or a solution with libinput ?

            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