Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. RPi Touch - Rotate touch events
Forum Updated to NodeBB v4.3 + New Features

RPi Touch - Rotate touch events

Scheduled Pinned Locked Moved Unsolved QtonPi
8 Posts 2 Posters 4.5k 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
    metRo_
    wrote on last edited by metRo_
    #1

    I'm having problem using the touchscreen with Qt. I have set up the touch as you said on the wiki however when I run a Qt application the touch doesn't seem to respect the configs.

    https://www.youtube.com/watch?v=OYeByglJ8sY

    What should I do?

    I cross compiled Qt using this tutorial https://wiki.qt.io/RaspberryPi2EGLFS

    Thank you

    1 Reply Last reply
    0
    • tomasz3dkT Offline
      tomasz3dkT Offline
      tomasz3dk
      wrote on last edited by
      #2

      Did you try to rotate coordinates as described in documentation: doc, by setting QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS?

      M 1 Reply Last reply
      0
      • tomasz3dkT tomasz3dk

        Did you try to rotate coordinates as described in documentation: doc, by setting QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS?

        M Offline
        M Offline
        metRo_
        wrote on last edited by
        #3

        @tomasz3dk said:

        Did you try to rotate coordinates as described in documentation: doc, by setting QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS?

        I did read that but I don't know where can I set these values :s

        tomasz3dkT 1 Reply Last reply
        0
        • M Offline
          M Offline
          metRo_
          wrote on last edited by
          #4

          Some more information:

          pi@raspberrypi:~/untitled13/bin $ ./untitled13
          QML debugging is enabled. Only use this in a safe environment.
          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: input device 'Intelligent Agent CDC and Digitizer', /dev/input/event0 is a touch device
          qt.qpa.input: Using xkbcommon for key mapping
          Created context for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1, profile  0) with config:
                  EGL_BUFFER_SIZE: 16
                  EGL_ALPHA_SIZE: 0
                  EGL_BLUE_SIZE: 5
                  EGL_GREEN_SIZE: 6
                  EGL_RED_SIZE: 5
                  EGL_DEPTH_SIZE: 24
                  EGL_STENCIL_SIZE: 8
                  EGL_CONFIG_CAVEAT: 12344
                  EGL_CONFIG_ID: 17
                  EGL_LEVEL: 0
                  EGL_MAX_PBUFFER_HEIGHT: 2048
                  EGL_MAX_PBUFFER_PIXELS: 4194304
                  EGL_MAX_PBUFFER_WIDTH: 2048
                  EGL_NATIVE_RENDERABLE: 1
                  EGL_NATIVE_VISUAL_ID: 107544
                  EGL_NATIVE_VISUAL_TYPE: 12344
                  EGL_SAMPLES: 0
                  EGL_SAMPLE_BUFFERS: 0
                  EGL_SURFACE_TYPE: 1639
                  EGL_TRANSPARENT_TYPE: 12344
                  EGL_TRANSPARENT_BLUE_VALUE: 0
                  EGL_TRANSPARENT_GREEN_VALUE: 0
                  EGL_TRANSPARENT_RED_VALUE: 0
                  EGL_BIND_TO_TEXTURE_RGB: 1
                  EGL_BIND_TO_TEXTURE_RGBA: 1
                  EGL_MIN_SWAP_INTERVAL: 0
                  EGL_MAX_SWAP_INTERVAL: 2147483647
          
          1 Reply Last reply
          0
          • M Offline
            M Offline
            metRo_
            wrote on last edited by
            #5

            I was able to make it work using the following:

            pi@raspberrypi:~/untitled13/bin $ ./untitled13 -plugin evdevtouch
            QML debugging is enabled. Only use this in a safe environment.
            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: input device 'Intelligent Agent CDC and Digitizer', /dev/input/event0 is a touch device
            qt.qpa.input: Using xkbcommon for key mapping
            qt.qpa.input: evdevtouch: Using device discovery
            qt.qpa.input: udev device discovery for type QFlags(0x2|0x4)
            qt.qpa.input: Found matching devices ("/dev/input/event0")
            qt.qpa.input: evdevtouch: Adding device at "/dev/input/event0"
            qt.qpa.input: evdevtouch: Using device /dev/input/event0
            qt.qpa.input: evdevtouch: /dev/input/event0: Protocol type B (mtdev) (multi)
            qt.qpa.input: evdevtouch: /dev/input/event0: min X: 0 max X: 480
            qt.qpa.input: evdevtouch: /dev/input/event0: min Y: 0 max Y: 800
            qt.qpa.input: evdevtouch: /dev/input/event0: min pressure: 0 max pressure: 1
            qt.qpa.input: evdevtouch: /dev/input/event0: device name: Intelligent Agent CDC and Digitizer
            Created context for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1, profile  0) with config:
                    EGL_BUFFER_SIZE: 16
                    EGL_ALPHA_SIZE: 0
                    EGL_BLUE_SIZE: 5
                    EGL_GREEN_SIZE: 6
                    EGL_RED_SIZE: 5
                    EGL_DEPTH_SIZE: 24
                    EGL_STENCIL_SIZE: 8
                    EGL_CONFIG_CAVEAT: 12344
                    EGL_CONFIG_ID: 17
                    EGL_LEVEL: 0
                    EGL_MAX_PBUFFER_HEIGHT: 2048
                    EGL_MAX_PBUFFER_PIXELS: 4194304
                    EGL_MAX_PBUFFER_WIDTH: 2048
                    EGL_NATIVE_RENDERABLE: 1
                    EGL_NATIVE_VISUAL_ID: 107544
                    EGL_NATIVE_VISUAL_TYPE: 12344
                    EGL_SAMPLES: 0
                    EGL_SAMPLE_BUFFERS: 0
                    EGL_SURFACE_TYPE: 1639
                    EGL_TRANSPARENT_TYPE: 12344
                    EGL_TRANSPARENT_BLUE_VALUE: 0
                    EGL_TRANSPARENT_GREEN_VALUE: 0
                    EGL_TRANSPARENT_RED_VALUE: 0
                    EGL_BIND_TO_TEXTURE_RGB: 1
                    EGL_BIND_TO_TEXTURE_RGBA: 1
                    EGL_MIN_SWAP_INTERVAL: 0
                    EGL_MAX_SWAP_INTERVAL: 2147483647
            qt.qpa.input: evdevtouch: Updating QInputDeviceManager device count: 1  touch devices, 0 pending handler(s)
            

            However I would like to know the diference between evtouch and libinput and which one is better?

            1 Reply Last reply
            0
            • M metRo_

              @tomasz3dk said:

              Did you try to rotate coordinates as described in documentation: doc, by setting QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS?

              I did read that but I don't know where can I set these values :s

              tomasz3dkT Offline
              tomasz3dkT Offline
              tomasz3dk
              wrote on last edited by
              #6

              @metRo_ You can add this to /etc/environment, and make this permanent (even after reset), or just export it in console before running your app, but it only will works in console where you exported this, and after reset it backs to default. But as you wrote, that using evdevtouch works, so you don't need this for now. For second question, i always use evdevtouch, and don't know which one is better ;).

              M 1 Reply Last reply
              0
              • tomasz3dkT tomasz3dk

                @metRo_ You can add this to /etc/environment, and make this permanent (even after reset), or just export it in console before running your app, but it only will works in console where you exported this, and after reset it backs to default. But as you wrote, that using evdevtouch works, so you don't need this for now. For second question, i always use evdevtouch, and don't know which one is better ;).

                M Offline
                M Offline
                metRo_
                wrote on last edited by
                #7

                @tomasz3dk said:

                But as you wrote, that using evdevtouch works, so you don't need this for now.

                I didn't understand what you mean, what I don't need?

                All the documentation said that by default it should use evdevtouch but in my case by default it use libinput and I need to specify that I want to use evdevtouch, any clue on it?

                tomasz3dkT 1 Reply Last reply
                0
                • M metRo_

                  @tomasz3dk said:

                  But as you wrote, that using evdevtouch works, so you don't need this for now.

                  I didn't understand what you mean, what I don't need?

                  All the documentation said that by default it should use evdevtouch but in my case by default it use libinput and I need to specify that I want to use evdevtouch, any clue on it?

                  tomasz3dkT Offline
                  tomasz3dkT Offline
                  tomasz3dk
                  wrote on last edited by
                  #8

                  @metRo_ said:

                  @tomasz3dk said:

                  But as you wrote, that using evdevtouch works, so you don't need this for now.

                  I didn't understand what you mean, what I don't need?

                  I mean, that you don't need overwrite QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS to ratate coordinates. Correct me if i'm wrong, but i assumed that, when you use evdevtouch plugin touchscreen works, as it should be? Unfortunately i don't know why it doesn't use evdevtouch by default.

                  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