summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 5fa9a92..c10db90 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -11708,6 +11708,22 @@ void QWidget::grabGesture(Qt::GestureType gesture, Qt::GestureContext context)
(void)QGestureManager::instance(); // create a gesture manager
}
+/*!
+ Unsubscribes the widget to a given \a gesture type
+
+ \sa QGestureEvent
+ \since 4.6
+*/
+void QWidget::ungrabGesture(Qt::GestureType gesture)
+{
+ Q_D(QWidget);
+ if (d->gestureContext.remove(gesture)) {
+ QGestureManager *manager = QGestureManager::instance();
+ manager->cleanupCachedGestures(this, gesture);
+ }
+}
+
+
QT_END_NAMESPACE
#include "moc_qwidget.cpp"