QGesture issues on OS X and Ubuntu



  • Hi everyone,

    I just started developing with Qt to write a minimal browser supporting multitouch.
    The final platform is an ARMv7-based embedded device with a 7inch multitouch display; the software stack consists of the Linux kernel (I wrote the multitouch display device driver myself) and the Ubuntu 13.10 root file system.

    As of now, I'm developing on both OS X (and I'm trying with Ubuntu too) on my MacBook Pro with a Magic Trackpad.
    I extended QGraphicsWebView to grab Qt::PanGesture, Qt::PinchGesture, and Qt::SwipeGesture and handle the gesture properly.
    The code I wrote to handle the QPinchGesture works fine, the "zoom" operates as in mobile devices (and as in Apple Safari), not as in most of desktop browsers; I used setTransformOriginPoint() and setScale() to achieve the behavior.
    As a side effect, this kind of zoom breaks scrolling as it is implemented by QGraphicsWebView.

    Apart from QPinchGesture, the browser doesn't intercept QPanGesture and QSwipeGesture on OS X and I can't understand why this is the case. In addition, neither of the gesture seems to work on Ubuntu.

    You can find a full example here: https://github.com/filipposironi/qtbrowser-gesture/tree/pinchablewebview .
    If anyone as suggestions, you are more than welcome.



  • For the records, the same issues occurs on OS X when using the imagegesture example (<Qt_install_directory>/5.2.1/clang_64/examples/gestures/imagegestures).
    The application supports Q{Pan|Pinch|Swipe}Gesture, however, only the QPinchGesture gets triggered, the others go unobserved.



  • I modified my system settings in OS X to avoid grabbing most of the gestures.
    The net result is that now gestures get to my Qt browser!
    Unfortunately, the "pan" gesture (putting 2 or more fingers on the trackpad) is recognized as a QTapAndHoldGesture and occasionally the sequence of QTapAndHoldGesture is interrupted by a QPanGesture.
    It seems it has something to do with "speed", if I tap and move slowly I see a QPanGesture the first event I see is a QPanGesture followed by 4 QTapAndHoldGesture (I get 4 of them every time).

    PS: I had to grab QTapAndHoldGesture in the constructure of PinchableWebView, which I derived from QGraphicsWebView.

    Up to now, I'm unable to produce any QSwipeGesture, I always get a sequence of QTapAndHoldGesture.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You may have found something for OS X. You should have a look at the "bug report system":http://bugreports.qt-project.org to see if you find something similar. If so please consider updating the report with your findings, if not open please create a new report with as much information you can.



  • [quote author="SGaist" date="1396425394"]Hi and welcome to devnet,

    You may have found something for OS X. You should have a look at the "bug report system":http://bugreports.qt-project.org to see if you find something similar. If so please consider updating the report with your findings, if not open please create a new report with as much information you can.[/quote]

    I didn't find any bug that was reporting anything similar to my issue on OS X. I opened a new one: https://bugreports.qt-project.org/browse/QTBUG-38046 .

    I'm also making additional experiments to better understand where Qt is behaving as expected. The weird thing is that on top of Linux/X11 (no window manager or desktop environment, just xinit to start X11), I don't see any gesture and all touch examples don't seem to behave as expected, even though xinput test-xi2, evtest, and mtdev-test report multi-touch events correctly (in fact Linux/X11/Unity recognizes at least 3-fingers panning).


  • Lifetime Qt Champion

    Thanks for the bug report !

    You might want to go to the interest mailing list to continue this. You'll find there Qt's developers/maintainers (this forum is more user oriented)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.