[Qt-interest] QGraphicsPixmapItem and Gestures?

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Thu Dec 23 12:30:16 CET 2010


Hi,

I have successfully implemented Gesture support on a QGraphicsScene level, but I would like to have Gestures recognised also by the individual QGraphicsScene items.

According to: http://doc.trolltech.com/latest/gestures-overview.html#using-standard-gestures-with-widgets : " To enable a gesture for a target object, call its QWidget::grabGesture() or QGraphicsObject::grabGesture() function..."

I have existing QGraphicsPixmapItem which /don't/ inherit from said QGraphicsObject. Is there a way to add Gesture support for for those items (and derivatives of QAbstractGraphicsShapeItem for that matter) as well?

Is that where the concept of setting a parent QGraphicsObject for the QGraphicsPixmapItem would come into play? The parent QGraphicsObject would grab the Gestures and handle them for its child QGraphicsPixmapItem, is that possible/The Way To Go(tm)?


Thanks,
  Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22




More information about the Qt-interest-old mailing list