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. Need Help: QTouchEvent Works but Qt Widgets UI Buttons Not Responding on Resistive Touch (TSC2007, Qt 5.12.12)

Need Help: QTouchEvent Works but Qt Widgets UI Buttons Not Responding on Resistive Touch (TSC2007, Qt 5.12.12)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
@qt-5@qtwidgets@allwinner@touchscreen@ubuntu
2 Posts 2 Posters 79 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.
  • T Offline
    T Offline
    Thirugnanasampantham
    wrote last edited by
    #1

    Hi everyone,
    I’m currently working on a Qt Widgets application running on an Allwinner A133 SoC with Ubuntu 18.04, Linux kernel 4.9, and a Resistive Touch Panel using the TSC2007 controller.

    I’m facing an issue where the touch interface works correctly with raw QTouchEvent handling, but UI elements (QPushButton, QCheckBox, QComboBox, etc.) do not receive touch events.

    ✅ What works

    • When I test using evtest, touch coordinates are detected.

    • Qt QTouchEvent / fingerpaint-style examples work and print the touch coordinates.

    • TouchBegin / TouchUpdate / TouchEnd events are fired correctly.

    ❌ What does NOT work

    • Qt Widgets UI controls do not respond to touch.

    • Buttons do not click.

    • Even though touch is detected at the Qt event level, the UI never triggers a pressed/clicked state.

    🔍 Possible root cause

    The TSC2007 resistive touch driver outputs raw 12-bit ADC values (0–4095) for both X and Y axes.

    Example from evtest:

    • ABS_X: 3000
    • ABS_Y: 1400

    But my display resolution is 1024 × 768, so Qt expects screen-mapped coordinates.

    This mismatch means:

    • Qt receives coordinates OUTSIDE the widget layouts

    • Touch events never map to the correct button positions

    • QTouchEvent works because it reads raw values, but QWidget-based button interaction fails

    ⚙️ System Details

    • SoC: Allwinner A133

    • OS: Ubuntu 18.04

    • Kernel: 4.9

    • Qt Version: 5.12.12 (Widgets)

    • Touch Controller: TSC2007 (Resistive)

    • Application Type: Qt Widgets (not QML)

    🙏 What I need help with

    I’m looking for guidance from anyone who has implemented resistive touch on Qt Widgets using TSC2007 or similar drivers.

    Any advice, examples, or references from anyone who worked on resistive touch with Qt 5.x would be really appreciated.

    Thank you!

    1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote last edited by
      #2

      Hi and welcome to the Qt Forum,
      touch handling has been refactored in Qt 6, and 5.12 has been EOL for a long time.
      Please upgrade to a newer Qt Version, preferably >= 6.5.

      Software Engineer
      The Qt Company, Oslo

      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