On Thu, Nov 08, 2012 at 08:07:31PM -0200, Rafael Roquetto wrote: > Hello, > > I was wondering if some gestures, such as QTapGesture or QTapAndHoldGesture > should consume QEvent::TouchBegin || QEvent::TouchEnd. The reason I am asking > this is that, if these events are not consumed somewhere along the chain, Qt > assumes that the touch events haven't been handled at all, and then > synthethizes and delivers corresponding MouseEvents (using > QApplicationPrivate::translateTouchToMouse), causing additional mouse events > to be delivered. Now, I am not sure if this is the intended behavior, but > I am assuming that applications watching for GestureEvents are not monitoring > TouchEvent directly, and thus receiving wasted mouse events. On the other > hand, "provide mechanism, not policy". > > Any thoughts?
Maybe if the recipient of the gesture accepts it, it should accept all the touches that contributed to the gesture? I guess I should try it to understand better how it works. > The reason I am bringing this up is that currently on Qt5, > QApplicationPrivate::translateTouchToMouse (or something related) is broken, > causing these mouse events that are synthethized from touch events to have a > position() of (0, 0). These mouse events are then also handled by the gesture That's surprising. I was working on it a couple of months ago, but mostly from the QML perspective. How do you reproduce the problem? > recognizers, which update the gesture position to that of this event - (0 ,0), > in a cascading effect. I am working on fixing that, patch will be in gerrit > soon. > > Thanks a lot, > Rafael > -- > ** Qt Developer Conference: http://qtconference.kdab.com/ ** > > Rafael Roquetto | [email protected] | Software Engineer > Klarälvdalens Datakonsult AB, a KDAB Group company > Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322) > KDAB - Qt Experts - Platform-independent software solutions > > _______________________________________________ > Development mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/development _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
