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. How to receive touch Events on MacOS X?
Forum Updated to NodeBB v4.3 + New Features

How to receive touch Events on MacOS X?

Scheduled Pinned Locked Moved General and Desktop
10 Posts 5 Posters 6.0k 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.
  • J Offline
    J Offline
    Jupiter
    wrote on last edited by
    #1

    Hi,

    im creating a desktop application and want to have a native user expierience. So how can i interact with a multi touch mouse or trackpad on MacOS X in a GraphicsScene? setting acceptTouchEvents(true) doesnt help and neither QEvent::TouchBegin, TouchEnd, TouchUpdate and Gesture is deliverd to my items. Is there a way to get it working?

    thanks

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jupiter
      wrote on last edited by
      #2

      doesnt have anyone an idea how to handle this?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jupiter
        wrote on last edited by
        #3

        still nobody? i would specially be intressted in swipe gestures to change pages like in safari

        1 Reply Last reply
        0
        • R Offline
          R Offline
          RicardoLima
          wrote on last edited by
          #4

          Did you ever find a solution for this? I am facing the same problem, developing a Qt application for MacOS and I'd like to be able to handle the multi finger swipe events on the trackpad, just like safari.
          I'd appreciate any help or pointers.
          Thanks!

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jupiter
            wrote on last edited by
            #5

            no unfortunately not. I'm thinking about calling mac os api, but haven't tried yes, because of lacking time. for me it is a nice to have feature not a must have.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              loladiro
              wrote on last edited by
              #6

              Multi Touch support is available in Qt since 4.6:
              "The Labs Post announcing it":http://labs.qt.nokia.com/2009/04/20/multi-touch-support-in-qt/
              "Multitouch on MacBooks":http://labs.qt.nokia.com/2009/06/23/multi-touch-on-mac/
              "Documentation on QTouchEvent":http://doc.qt.nokia.com/4.7-snapshot/qtouchevent.html

              EDIT: To get it to work with GraphicsView/Scene, you'll have to subclass QGraphicsView and handle the events there.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                RicardoLima
                wrote on last edited by
                #7

                Ok, this will give access to the TouchEvents and touch points, as far as I can tell. But in that case I have to then implement the gesture recognizer myself, right?
                Does Qt capture the Gesture events (not touch events) generated by MacOS and encapsulate them in Qt Events?
                I'm interested in events like 2 and 3 finger swipes and pinch-zoom gestures. And if possible, I'd like to use the Os gesture recognizers, and not have to reinvent the wheel.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  loladiro
                  wrote on last edited by
                  #8

                  Qt does recognize gestures see "here":http://doc.qt.nokia.com/4.8-snapshot/gestures-overview.html

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    gaojinhsu
                    wrote on last edited by
                    #9

                    have you made it? i am facing this problem now.
                    [quote author="Jupiter" date="1309935386"]Hi,

                    im creating a desktop application and want to have a native user expierience. So how can i interact with a multi touch mouse or trackpad on MacOS X in a GraphicsScene? setting acceptTouchEvents(true) doesnt help and neither QEvent::TouchBegin, TouchEnd, TouchUpdate and Gesture is deliverd to my items. Is there a way to get it working?

                    thanks[/quote]

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      Batteries Included
                      wrote on last edited by
                      #10

                      I think its just broken on OSX, see here:
                      https://bugreports.qt-project.org/browse/QTBUG-28126

                      Odd thing is the bug report hasn't had more votes, seems like core functionality broken to me.

                      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