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. QTouchEvent::TouchPoint pressure information
Forum Updated to NodeBB v4.3 + New Features

QTouchEvent::TouchPoint pressure information

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 3 Posters 4.7k 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
    Mani
    wrote on last edited by
    #1

    Hello,

    I'm interrested in implementation of a QML Multitouch application
    detecting the pressure level of the touch point.
    When looking at the QTouchEvent::TouchPoint I can see the
    pressure() method returning a real value between 0 and 1
    Does anybody know wich kind of terminal (smartphone, tablet, ...)
    is able to give back such information up to the Qt level.
    Is there any standardisation for the driver encoding of such event.

    Thanks in advance

    [moved to the qt quick subforum, Eddy]

    1 Reply Last reply
    0
    • A Offline
      A Offline
      aabc
      wrote on last edited by
      #2

      I think QTouchEvent is deprecated

      1 Reply Last reply
      0
      • A Offline
        A Offline
        agocs
        wrote on last edited by
        #3

        [quote author="aabc" date="1337527653"]I think QTouchEvent is deprecated[/quote]

        QTouchEvent is certainly not deprecated. As for the pressure, QTouchEvent tries to hide the platform/driver differences by presenting a normalized value in range 0..1 with 1 being the maximum pressure.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aabc
          wrote on last edited by
          #4

          How can I use QTouchEvent::TouchPoint in QML ?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            agocs
            wrote on last edited by
            #5

            Qt 5 has MultiPointTouchArea.

            For Qt 4 there is no built-in solution but you can always handle the touch events in C++ and expose them to QML yourself. Alternatively there used to be a separate, experimental TouchArea element, see http://labs.qt.nokia.com/2011/02/08/a-toucharea-for-qml

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aabc
              wrote on last edited by
              #6

              How can I handle the touch events in C++ and expose them to QML myself ?

              1 Reply Last reply
              0
              • A Offline
                A Offline
                agocs
                wrote on last edited by
                #7

                Implement a custom declarative item, reimplement event() and handle the touch events. This item can then have some signals to indicate a touch event has occured and a number of properties that provide the touch point data (position, etc.). This is exactly what QQuickMultiPointTouchArea (the implementation of MultiPointTouchArea) does in Qt 5.

                Alternatively, if a custom item is not desired, you could still install an event filter on the declarative view and expose the events/data to QML via a QObject.

                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