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. How do I know how many touch points there are at any given time?

How do I know how many touch points there are at any given time?

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 3 Posters 3.1k 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
    MyQtAccount
    wrote on last edited by
    #1

    I am using some built in Qt multitouch gestures and custom gestures. I can do a drag selection when the screen is touched and I don't want that to happen when there is more than one touch point.

    How can I poll the system to find out how many there are? It doesn't matter if there is or isn't a gesture running, I just don't want drag to happen if there is more than one point.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bjanuario
      wrote on last edited by
      #2

      Hi,

      You should look at this:
      @Qt::TouchPointPressed 0x01 The touch point is now pressed.
      Qt::TouchPointMoved 0x02 The touch point moved.
      Qt::TouchPointStationary 0x04 The touch point did not move.
      Qt::TouchPointReleased 0x08 The touch point was released.@

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MyQtAccount
        wrote on last edited by
        #3

        Those assume I have a touch event though, correct? I want to know at any given time if there are touch points and how many.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bjanuario
          wrote on last edited by
          #4

          You should use a loop QTimer event to check this

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vladstelmahovsky
            wrote on last edited by
            #5

            read "this":http://qt-project.org/doc/qt-4.8/qtouchevent.html#touchPoints

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MyQtAccount
              wrote on last edited by
              #6

              [quote author="vladstelmahovsky" date="1370410991"]read "this":http://qt-project.org/doc/qt-4.8/qtouchevent.html#touchPoints[/quote]

              I have already read that and I have a custom gesture to count and store the point total. What I wanted was to not have to use a gesture, but instead just call a API to if possible.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                bjanuario
                wrote on last edited by
                #7

                ohh , ok , sorry my misunderstood. I never did that way, I did as I mention before ... not so complex than your ... let's hope someone else can help you ;)

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  MyQtAccount
                  wrote on last edited by
                  #8

                  It isn't really that big of an issue since I use the custom gesture. I was just hoping there was one less step for other people to do when using my gesture recognizer.

                  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