[Qt-interest] QTouchEvent/QGestureEvent propagation

Stephen M. Webb stephen.webb at bregmasoft.ca
Mon Apr 11 17:09:18 CEST 2011


On Sun, 2011-04-10 at 22:33 +0200, Wathek LOUED wrote:
> Hi all,
> 
> I've noticed that the Events in Qt using the
> QGraphicsView/QGraphicsScene/QGraphicsItem are spread from the QGraphicsView
> then to the QGraphicsScene and the to the item that got the lowest Z-Index
> to the most top item.
> 
> I think that that's a bit weird cause generally when using QTouchEvent and
> QGesture we look at the most top element so imagine that you programmed a
> gesture and that that gesture occured at position (x, y) and in that
> position there's 4 items that are grabbing the same gesture, so it'll be
> grabbed by all the item and not the top element won't it ?

But imagine the scenario in which a multi-touch gesture is made with
four fingers spread across the scene?  Which element should receive the
event?  Should all elements receive a single-finger gesture or does a
4-finger gesture have some significance?  Is the QGraphicsScene not the
right place to determine that?

-- 
Stephen M. Webb
stephen.webb at bregmasoft.ca




More information about the Qt-interest-old mailing list