diff options
author | Thomas Zander <thomas.zander@trolltech.com> | 2009-10-21 11:58:24 (GMT) |
---|---|---|
committer | Thomas Zander <thomas.zander@trolltech.com> | 2009-10-26 11:21:57 (GMT) |
commit | 25bc5c29db866d5abc3f9fbae7b5211e2e6b1f25 (patch) | |
tree | a7aec5c7fdbbf63df3b01bc357a5e66d52c741be /src/gui/kernel/qwidget.cpp | |
parent | 92d8b0e1d6ecce8214b24a08b8a199af4321bd88 (diff) | |
download | Qt-25bc5c29db866d5abc3f9fbae7b5211e2e6b1f25.zip Qt-25bc5c29db866d5abc3f9fbae7b5211e2e6b1f25.tar.gz Qt-25bc5c29db866d5abc3f9fbae7b5211e2e6b1f25.tar.bz2 |
Add QWidget::ungrabGesture
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 16 |
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" |