Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Convert QTApplication from mouse input to touch input

Convert QTApplication from mouse input to touch input

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 288 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.
  • E Offline
    E Offline
    Eli_a_n
    wrote on last edited by
    #1

    Hi, I've build an QtApplication that works perfect with a mouse on Linux however, i want to use it for Raspberry pi with a touch screen.

    When i run it on the Raspberry pi, the mouse cursor is still present and touch input doesn't work (however, the courser moves in the app background because when i close the app, i can see the mouse being moved from the location that i left it when starting the app and also the terminal text being selected due to me touching and pressing the raspberry pi screen. )

    I have tried :
    QCoreApplication::setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, true);
    QCoreApplication::setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, false);

    however, this doesn't work.

    Any idea on how i can tell the app to use touch input and not the mouse (disabling the cursor would also be great. )
    Thank you.
    Regards

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Eli_a_n
      wrote on last edited by
      #2

      I have found the answer here : https://forum.qt.io/topic/82892/how-to-install-tslib-plugin-for-qt-5-7/14

      regards

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved