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. RaspberryPi touchscreen does not react to touch in Qt app
Qt 6.11 is out! See what's new in the release blog

RaspberryPi touchscreen does not react to touch in Qt app

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 3 Posters 1.4k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    MajidKamali
    wrote on last edited by MajidKamali
    #1

    Hi.
    I compiled Qt5.12.7 natively in RaspberryPi 3B+, Raspbian, EGLFS.
    I have a waveshare 3.5" type C touchscreen, drivers installed and has display output correctly.
    But I can not touch the screen in Qt app. In lxde desktop environment, touchscreen works ok.
    I enabled plugin logging qt.qpa.* and here's the results for default libinput:

    qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_brcm", "eglfs_emu")
    qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm", "eglfs_emu")
    qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
    qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_brcm"
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    qt.qpa.input: libinput: event6  - ADS7846 Touchscreen: is tagged by udev as: Touchscreen
    qt.qpa.input: libinput: event6  - ADS7846 Touchscreen: device is a touch device
    qt.qpa.input: libinput: event0  - COMPANY 2.4G Device: is tagged by udev as: Keyboard
    qt.qpa.input: libinput: event0  - COMPANY 2.4G Device: device is a keyboard
    qt.qpa.input: libinput: event1  - COMPANY 2.4G Device Mouse: is tagged by udev as: Mouse
    qt.qpa.input: libinput: event1  - COMPANY 2.4G Device Mouse: device is a pointer
    qt.qpa.input: libinput: event2  - COMPANY 2.4G Device Keyboard: is tagged by udev as: Keyboard
    qt.qpa.input: libinput: event2  - COMPANY 2.4G Device Keyboard: device is a keyboard
    qt.qpa.input: libinput: event3  - COMPANY 2.4G Device: not tagged as supported input device
    qt.qpa.input: libinput: event3  - not using input device '/dev/input/event3'
    qt.qpa.input: libinput: event4  - COMPANY 2.4G Device Consumer Control: is tagged by udev as: Keyboard
    qt.qpa.input: libinput: event4  - COMPANY 2.4G Device Consumer Control: device is a keyboard
    qt.qpa.input: libinput: event5  - COMPANY 2.4G Device System Control: is tagged by udev as: Keyboard
    qt.qpa.input: libinput: event5  - COMPANY 2.4G Device System Control: device is a keyboard
    qt.qpa.input: Using xkbcommon for key mapping
    qt.qpa.input: libinput: registerDevice /dev/input/event6 - ADS7846 Touchscreen
    

    I used evdev, but touch does not work again: (QT_QPA_EGLFS_NO_LIBINPUT=1)

    qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_brcm", "eglfs_emu")
    qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm", "eglfs_emu")
    qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
    qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_brcm"
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    qt.qpa.input: evdevkeyboard: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Keyboard)
    qt.qpa.input: Found matching devices ("/dev/input/event0", "/dev/input/event2", "/dev/input/event4", "/dev/input/event5")
    qt.qpa.input: Adding keyboard at "/dev/input/event0"
    qt.qpa.input: Try to create keyboard handler for "/dev/input/event0" ""
    qt.qpa.input: Opening keyboard at "/dev/input/event0"
    qt.qpa.input: Create keyboard handler with for device "/dev/input/event0"
    qt.qpa.input: Unload current keymap and restore built-in
    qt.qpa.input: numlock=0 , capslock=0, scrolllock=0
    qt.qpa.input: Adding keyboard at "/dev/input/event2"
    qt.qpa.input: Try to create keyboard handler for "/dev/input/event2" ""
    qt.qpa.input: Opening keyboard at "/dev/input/event2"
    qt.qpa.input: Create keyboard handler with for device "/dev/input/event2"
    qt.qpa.input: Unload current keymap and restore built-in
    qt.qpa.input: numlock=0 , capslock=0, scrolllock=0
    qt.qpa.input: Adding keyboard at "/dev/input/event4"
    qt.qpa.input: Try to create keyboard handler for "/dev/input/event4" ""
    qt.qpa.input: Opening keyboard at "/dev/input/event4"
    qt.qpa.input: Create keyboard handler with for device "/dev/input/event4"
    qt.qpa.input: Unload current keymap and restore built-in
    qt.qpa.input: numlock=0 , capslock=0, scrolllock=0
    qt.qpa.input: Adding keyboard at "/dev/input/event5"
    qt.qpa.input: Try to create keyboard handler for "/dev/input/event5" ""
    qt.qpa.input: Opening keyboard at "/dev/input/event5"
    qt.qpa.input: Create keyboard handler with for device "/dev/input/event5"
    qt.qpa.input: Unload current keymap and restore built-in
    qt.qpa.input: numlock=0 , capslock=0, scrolllock=0
    qt.qpa.input: evdevmouse: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Mouse|Device_Touchpad)
    qt.qpa.input: Found matching devices ("/dev/input/event1")
    qt.qpa.input: Adding mouse at "/dev/input/event1"
    qt.qpa.input: create mouse handler for "/dev/input/event1" ""
    qt.qpa.input: evdevtouch: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Touchpad|Device_Touchscreen)
    qt.qpa.input: Found matching devices ("/dev/input/event6")
    qt.qpa.input: evdevtouch: Adding device at "/dev/input/event6"
    qt.qpa.input: evdevtouch: Using device /dev/input/event6
    qt.qpa.input: evdevtouch: /dev/input/event6: Protocol type B (mtdev) (multi), filtered=no
    qt.qpa.input: evdevtouch: /dev/input/event6: min X: 0 max X: 0
    qt.qpa.input: evdevtouch: /dev/input/event6: min Y: 0 max Y: 0
    qt.qpa.input: evdevtouch: /dev/input/event6: min pressure: 0 max pressure: 255
    qt.qpa.input: evdevtouch: /dev/input/event6: device name: ADS7846 Touchscreen
    qt.qpa.input: evdevtouch: Updating QInputDeviceManager device count: 1  touch devices, 0 pending handler(s)
    

    I don't know what might be the problem, Is it related to these lines?

    qt.qpa.input: evdevtouch: /dev/input/event6: min X: 0 max X: 0
    qt.qpa.input: evdevtouch: /dev/input/event6: min Y: 0 max Y: 0
    

    Thanks

    1 Reply Last reply
    1
    • P Offline
      P Offline
      poucz
      wrote on last edited by
      #2

      Same behavior (driver ADS7846)
      I thought problem is that min and max value is 0

      qt.qpa.input: evdevtouch: /dev/input/event6: min X: 0 max X: 0
      qt.qpa.input: evdevtouch: /dev/input/event6: min Y: 0 max Y: 0

      But evtest work correctly.

      Input device name: "ADS7846 Touchscreen"
      Supported events:
        Event type 0 (EV_SYN)
        Event type 1 (EV_KEY)
          Event code 330 (BTN_TOUCH)
        Event type 3 (EV_ABS)
          Event code 0 (ABS_X)
            Value   2911
            Min        0
            Max     4095
          Event code 1 (ABS_Y)
            Value   3039
            Min        0
            Max     4095
          Event code 24 (ABS_PRESSURE)
            Value      0
            Min        0
            Max      255
      

      Don't know how to solve this.
      Thank for any help.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        poucz
        wrote on last edited by
        #3

        when I compile QT from fresh source, it work....

        1 Reply Last reply
        1
        • M Offline
          M Offline
          maurofaresoftware.it
          wrote on last edited by
          #4

          Hi all.
          I have the same problem with Rpi 3b, Qt 5.8.0 and ELGFS, compiled from fresh.

          I get
          qt.qpa.input: evdevtouch: /dev/input/event0: min X: 0 max X: 0

          and if I touch on the screen nothing happens.
          evtest works fine

          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