[Qt-interest] cannot grab gesture with qgraphicsobject

Till Oliver Knoll till.oliver.knoll at gmail.com
Mon Mar 14 23:44:53 CET 2011


Am 14.03.11 23:00, schrieb Till Oliver Knoll:
> ... 
> However I still don't know how to receive "pinch rotate" gestures on Windows 7 - in a QGraphicsScene, that is (I have yet to test the Qt example which operates on a plain QWidget).

Here are some more findings: on said Windows 7 Started edition, on a
Samsung "N150 Plus" netbook ("the only Windows 7 I have access to" ;)
the Qt example "imagegestures" is NOT working either: to zoom, no
rotation, no pan. When doing the zoom (aka pinch scale) or rotate
gesture on the trackpad the mouse cursor changes shape, but the loaded
image would not move at all.

I know that when doing a "Pan" gesture (I have no clue how to do that on
Windows anyway, on Mac that is touching and holding the finger for about
1/2 second on the trackpad) the Qt example app would change cursor -
this is not the case either (I tried all sorts of gestures ;)


By now I checked the mouse gesture settings of the driver, they all seem
to be activated. It sais "Elan Smart-Pad" (www.emc.com.tw) - I agree
probably not the "reference platform" to test gestures on Windows 7. ;)

However when I tested my example on some DELL laptop running Windows 7
Professional I also did not receive rotate events (back then with Qt
4.7.1 - currently I am using 4.7.2 on all mentioned platforms) and
observed the same "reversed zoom effect" (which now has turned out to be
wheel events instead).

Then again, I really can't imagine that on Windows 7 gestures wouldn't
work at all! At least Sean did several tests - he even tried my examples
with the elsewhere mentioned problem with Pan gestures on Mac which
seemed to work fine on his Windows 7 installation!


This site

  http://msdn.microsoft.com/en-us/library/dd353242%28v=vs.85%29.aspx

seems to indicate that there is really a "gesture zoom" event GID_ZOOM,
but on the other hand

  http://msdn.microsoft.com/en-us/library/dd940543%28v=vs.85%29.aspx

seems to suggest that it would default to "mouse wheel + CTRL". An event
which the Qt example clearly does not handle at all. But thinking a bit
more about it, "defaults to CTRL key + Scroll wheel" probably means "if
not handled otherwise by handling GID_ZOOM / gestures at all". And I
strongly suspect that Qt does the later ;)


Bottom line: at least on a DELL laptop and on this Samsung Netbook
(well...) I did not/do not receive rotate events in QGraphicsView. The
Qt imagegesture example does not seem to work at all on that Samsung
Netbook (it works perfectly on Mac OS X).

I wonder whether other people observe that the Qt "imagegesture" example
is not working on their Windows 7 installation, and whether that is
really just because the trackpad driver does not properly work, or
whether Qt does not receive/handle gesture events on Windows 7 properly.


Cheers,
  Oliver





More information about the Qt-interest-old mailing list