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. QGesture issues on OS X and Ubuntu
Forum Updated to NodeBB v4.3 + New Features

QGesture issues on OS X and Ubuntu

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.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.
  • F Offline
    F Offline
    filippo.sironi
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      filippo.sironi
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • F Offline
        F Offline
        filippo.sironi
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • F Offline
            F Offline
            filippo.sironi
            wrote on last edited by
            #5

            [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).

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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