diff options
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 3069733..45627f6 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -663,6 +663,8 @@ #include <private/qpixmap_x11_p.h> #endif +#include <private/qgesturemanager_p.h> + #include <math.h> QT_BEGIN_NAMESPACE @@ -7286,6 +7288,19 @@ QGraphicsObject::QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent } /*! + Subscribes the graphics object to the given \a gesture for the specified \a context. + + \sa QGestureEvent +*/ + +void QGraphicsObject::grabGesture(Qt::GestureType gesture, Qt::GestureContext context) +{ + QGraphicsItemPrivate * const d = QGraphicsItem::d_func(); + d->gestureContext.insert(gesture, context); + (void)QGestureManager::instance(); // create a gesture manager +} + +/*! \property QGraphicsObject::parent \brief the parent of the item |