[Qt-interest] QTouchEvents and qgraphicspixmapitem
Till Oliver Knoll
till.oliver.knoll at gmail.com
Tue Aug 9 15:30:34 CEST 2011
2011/8/9 Vesa Shmuel Peltonen <vesashmuel at gmail.com>:
> Hi,
> I've observed a strange behavior, and would like to ask if anybody else have
> seen it.
> I've an inherited qgraphicspixmap in which I used to get touch events ok
> (used for pinch zooming). After that I've modified some unrelated code on
> the application, and suddenly I stopped receiving the touch events to the
> pixmap item (::sceneEvent ( QEvent * event )). I still receive mouse events.
> I've seen the same problem with my application also after using http
> connection. ...
Hello Vesa,
just some *very* general thoughts: I once struggled with QGesture
events in combination with QPixmapGraphicsItems as well, on Mac OS X
(and gave up).
Some example code and explanations are here:
https://bugreports.qt.nokia.com/browse/QTBUG-16281
One thing I noted is that this whole gesture thing in combination with
the QGraphicsView seems to be very fragile and (partly) relies on
QTimers (at least for the Pan gesture)
My specific problem was that Pan gestures would not be recognised by
the pixmap items, but only if the mouse cursor was hovering over them!
However I did not deal with the gesture events myself within the
pixmap item, but rather used the Qt gesture recogniser.
I have *no* idea how this could relate to your issue, but maybe while
reading the bug issue above and looking at the example code which is
attached you get some ideas.
Sorry not to be able to help you any more,
Oliver
More information about the Qt-interest-old
mailing list