Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Touch Input
QtWS25 Last Chance

Touch Input

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 2 Posters 668 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.
  • L Offline
    L Offline
    Larvae
    wrote on last edited by
    #1

    Hi,

    I looked at the different classes for input on touch devices and I'm not sure how to use them.

    The older one would be MultiPointTouchArea. In the example, they add TouchPoints to it's list. Will this always be the points to work with? Then I could not handle three touch points if I only add two? And are they always used in their order? will my first touch point always be the first in the list ?

    A more appropriate way to handle Input seems to be the newer PointerHandler classes. But how would I get the touchpoints from a MultiPointHandler? The is no function to get them, or how does this work here?

    Are there any differences between them I need to know?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      There is nothing exist to get the touch points from MultiPointHandler. Moreover it is not even register with QML. So you can't directly use it. So your choice is MultiPointTouchArea. If you add only two touch points, you need to handle only two. Please look at max and min touch points property.

      Also it maintains the order of your touchpoints.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Larvae
        wrote on last edited by
        #3

        Thanks.

        If there is no way to get the points from MultiPointHandler it's probably still in developement?

        Looks like I didn't read the doc for MultiPointTouchArea properly, did not see the explaination about the point list.

        But the MultiPointTouchArea will not distinguish between devices, so it won't be able to tell if it's a finger or stylus, right? If I need that I would have to use it together with a SignlePointHandler for a single stylus input and the other one for multitouch input?

        In c++ the TouchPoint class and QTabletEvent supports additional features like tilt. Would it be very difficult to use it in an application with qml gui?

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          Any idea why you would like to distinguish between the finger touch or stylus ? If your idea is identify of single touch or multitouch, touch area will take care of that.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          0
          • L Offline
            L Offline
            Larvae
            wrote on last edited by
            #5

            One example would be to assign an artificial pressure value to a touch event while a stylus often has pressure support.

            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