Results 1 to 4 of 4

Thread: Qt 5.15 Multitouch issue

  1. #1
    Join Date
    May 2008
    Location
    Spain
    Posts
    92
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Qt 5.15 Multitouch issue

    Hello everybody.
    I have a strange issue that I don't understand and maybe you can help me.

    Qt 5.15 compile with multiotuch support.

    Qt Code:
    1. Qt Gui:
    2. Accessibility .......................... yes
    3. FreeType ............................... yes
    4. Using system FreeType ................ yes
    5. HarfBuzz ............................... no
    6. Using system HarfBuzz ................ no
    7. Fontconfig ............................. yes
    8. Image formats:
    9. GIF .................................. yes
    10. ICO .................................. yes
    11. JPEG ................................. yes
    12. Using system libjpeg ............... yes
    13. PNG .................................. yes
    14. Using system libpng ................ yes
    15. Text formats:
    16. HtmlParser ........................... yes
    17. CssParser ............................ yes
    18. OdfWriter ............................ yes
    19. MarkdownReader ....................... yes
    20. Using system libmd4c ............... no
    21. MarkdownWriter ....................... yes
    22. EGL .................................... yes
    23. OpenVG ................................. no
    24. OpenGL:
    25. Desktop OpenGL ....................... no
    26. OpenGL ES 2.0 ........................ yes
    27. OpenGL ES 3.0 ........................ yes
    28. OpenGL ES 3.1 ........................ yes
    29. OpenGL ES 3.2 ........................ yes
    30. Vulkan ................................. no
    31. Session Management ..................... yes
    32. Features used by QPA backends:
    33. evdev .................................. yes
    34. libinput ............................... no
    35. INTEGRITY HID .......................... no
    36. mtdev .................................. yes
    37. tslib .................................. yes
    38. xkbcommon .............................. yes
    39. X11 specific:
    40. XLib ................................. yes
    41. XCB Xlib ............................. yes
    42. EGL on X11 ........................... no
    43. xkbcommon-x11 ........................ yes
    44. QPA backends:
    45. DirectFB ............................... yes
    46. EGLFS .................................. yes
    47. EGLFS details:
    48. EGLFS OpenWFD ........................ no
    49. EGLFS i.Mx6 .......................... no
    50. EGLFS i.Mx6 Wayland .................. no
    51. EGLFS RCAR ........................... no
    52. EGLFS EGLDevice ...................... yes
    53. EGLFS GBM ............................ yes
    54. EGLFS VSP2 ........................... no
    55. EGLFS Mali ........................... no
    56. EGLFS Raspberry Pi ................... no
    57. EGLFS X11 ............................ no
    58. LinuxFB ................................ yes
    59. VNC .................................... yes
    60. Qt Sql:
    61. SQL item models ........................ yes
    62. Qt Widgets:
    63. GTK+ ................................... no
    64. Styles ................................. Fusion Windows
    65. Qt PrintSupport:
    66. CUPS ................................... no
    67. Qt Sql Drivers:
    68. DB2 (IBM) .............................. no
    69. InterBase .............................. no
    70. MySql .................................. yes
    71. OCI (Oracle) ........................... no
    72. ODBC ................................... no
    73. PostgreSQL ............................. no
    74. SQLite2 ................................ no
    75. SQLite ................................. no
    76. Using system provided SQLite ......... no
    77. TDS (Sybase) ........................... no
    78. Qt Testlib:
    79. Tester for item models ................. yes
    To copy to clipboard, switch view to plain text mode 

    The examples in the widgets secction works fine. ( PinchZoom, FingerPaint and Knobs ).
    But the issue is when I create a stupid app with 4 buttons and it's impossible to press two of them at the same time.
    I enable the "qt.qpa.input" option to see what happen.

    Qt Code:
    1. qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Touchpad|Device_Touchscreen)
    2. qt.qpa.input: Found matching devices ("/dev/input/event6")
    3. qt.qpa.input: evdevtouch: Adding device at /dev/input/event6
    4. qt.qpa.input: evdevtouch: Using device /dev/input/event6
    5. qt.qpa.input: Adding mouse at /dev/input/event6
    6. qt.qpa.input: create mouse handler for "/dev/input/event6" ""
    7. qt.qpa.input: evdevtouch: /dev/input/event6: Protocol type B (mtdev) (multi), filtered=no
    8. qt.qpa.input: evdevtouch: /dev/input/event6: min X: 0 max X: 4095
    9. qt.qpa.input: evdevtouch: /dev/input/event6: min Y: 0 max Y: 4095
    10. qt.qpa.input: evdevtouch: /dev/input/event6: min pressure: 0 max pressure: 0
    11. qt.qpa.input: evdevtouch: /dev/input/event6: device name: DATA MODUL easyMaxTouch
    To copy to clipboard, switch view to plain text mode 

    Qt recognize the device as Touch device and also it detects as MultiTouch Protocol type B.

    Qt Code:
    1. # evtest /dev/input/event6
    2. Input driver version is 1.0.1
    3. Input device ID: bus 0x3 vendor 0x7374 product 0x1252 version 0x111
    4. Input device name: "DATA MODUL easyMaxTouch"
    5. Supported events:
    6. Event type 0 (EV_SYN)
    7. Event type 1 (EV_KEY)
    8. Event code 330 (BTN_TOUCH)
    9. Event type 3 (EV_ABS)
    10. Event code 0 (ABS_X)
    11. Value 828
    12. Min 0
    13. Max 4095
    14. Resolution 20
    15. Event code 1 (ABS_Y)
    16. Value 1144
    17. Min 0
    18. Max 4095
    19. Resolution 26
    20. Event code 47 (ABS_MT_SLOT)
    21. Value 0
    22. Min 0
    23. Max 15
    24. Event code 53 (ABS_MT_POSITION_X)
    25. Value 0
    26. Min 0
    27. Max 4095
    28. Resolution 20
    29. Event code 54 (ABS_MT_POSITION_Y)
    30. Value 0
    31. Min 0
    32. Max 4095
    33. Resolution 26
    34. Event code 57 (ABS_MT_TRACKING_ID)
    35. Value 0
    36. Min 0
    37. Max 65535
    38. Properties:
    39. Property type 1 (INPUT_PROP_DIRECT)
    40. Testing ... (interrupt to exit)
    To copy to clipboard, switch view to plain text mode 

    So far, so good. But at this points, when I try to execute a stupid App with four buttons, just one can press.

    What is missing or what is wrong ?
    Thank you ver much in advance.
    Last edited by webquinty; 12th April 2022 at 14:11.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,138
    Thanks
    294
    Thanked 852 Times in 839 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5.15 Multitouch issue

    I am pretty sure that the default higher-level behavior for QPushButton (and any class derived from QAbstractButton) is that only one button can be pressed at a time. If you want behavior that allows more than one "button" to be pressed simultaneously, then you will probably have to create your own widget to do this.

    Even though multi-touch is enabled, by the time the event gets to a QAbstractButton, only one touch wins the race.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    May 2008
    Location
    Spain
    Posts
    92
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.15 Multitouch issue

    Thank you very much for your response.

    Maybe there is a mistake in my post. I have used QToolButton instead of QPusButton.
    But anyway, QToolButton derives from QAbstractButton and surprisingly I have an application that I made years ago with several QToolButtons and 4 QDials and the multitouch works as expected.

    I can press up to 10 QtoolButtons and I can operate 4 QDial with four fingers at the same time.
    That's why I say I'm a bit confused, but thanks anyway and I'll try to figure out what I did.

    Best regards

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,138
    Thanks
    294
    Thanked 852 Times in 839 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5.15 Multitouch issue

    Perhaps you have auto-repeat enabled for these buttons and dials. I can't find any property of QAbstractButton that you can set to allow multiple buttons to be active simultaneously.

    It is possible that at a higher level, the handler for the buttons is responding to the QAbstractButton::pressed() signals sent by the separate buttons. As long as there have been no QAbstractButton::released() signals in between presses, this would simulate multiple simultaneous button presses.

    If your program handles the QAbstractButton::clicked() or QAbstractButton::toggled() signals instead, those correspond to a pressed / released sequence, so it is impossible to detect multiple button presses.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Qt embedded, multitouch and tslib with multitouch support
    By webquinty in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 31st October 2014, 16:00
  2. Qt MultiTouch on Linux
    By wyjyan in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2012, 07:08
  3. Qt Multitouch implementation
    By sonulohani in forum Qt Programming
    Replies: 0
    Last Post: 7th June 2012, 06:51
  4. Disable Multitouch in QWebKit
    By KenJustKen in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2012, 05:44
  5. Multitouch and N900
    By acano in forum Qt Programming
    Replies: 1
    Last Post: 30th September 2010, 08:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.