[Development] Should gestures consume events?

Rafael Roquetto rafael.roquetto at kdab.com
Fri Nov 9 16:56:53 CET 2012


Hi,

On Fri, Nov 09, 2012 at 10:53:16AM +0100, Shawn Rutledge wrote:
<snip>

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

I think in the end it all boils down to the question whether sending/receiving
these extra mouse events is something bad. The most flexible way is to leave
things as they currently are. I just don't know if this is premature
pessimization or optmization to try to do away with the mouse events.

> 
> > 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?

Simply subclass QWidget, grab TapAndHoldGesture and once you receive it on
::event(), try printing the value of QTapAndHoldGesture::position().

About QML, I am not sure how things work, but I am assuming that they are
kinda different, since all this gestures mechanisms live in QtWidgets module.

> 
> > 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 | rafael.roquetto at kdab.com | 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
> > Development at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
> 

-- 
** Qt Developer Conference: http://qtconference.kdab.com/ **

Rafael Roquetto | rafael.roquetto at kdab.com | 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3721 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121109/e9029fab/attachment.bin>


More information about the Development mailing list