Please nominate your Qt Champions for 2021!

Swipe Gesture not Recognized on Macbook Pro (OSX Mavericks) (Qt 5.3)

  • It seems that the swipe gesture is not recognized on the macbook pro using the image gestures example. The pinch / rotate works just fine.

    There is a closed bug Qt QTBUG-28126 that reports this as fixed in Qt 5.2. I'm running Qt5.3.

    Has anybody gotten the SwipeGesture to work a macbook pro with the trackpad?
    Or do I need to resort to creating a customer recognizer for this basic function?

    Any help is appreciated.

  • Just for info, the swipe gesture in Qt require 3 touch points to activate on a touchscreen.

    Don't have much info with trackpad, need to check the source code in Qt.


  • @sam: Thanks for the info.

    That might be the problem. The MacBook Pro grabs the 3-point swipe gesture to show a multi-desktop view, which might explain why I never see that gester event. I wonder if anyone has been able to get this to work on the mac with a trackpad.

  • Other than that you can also write your custom gesture by sub classing "QGestureRecognizer":

    Have a look at this "example":

  • @jxem This is probably too late, but I just wanted to write this answer for reference.

    If you are using a Trackpad:

    1. go to System Preferences > Trackpad
    2. Select 'More Gestures'
    3. Change 'Swipe between pages' to 'Swipe with three fingers'
    4. Then you can use three fingers to activate the Swipe Gesture in your Qt application.

Log in to reply