diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-05-02 14:22:27 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-05-02 20:50:59 +0000 |
commit | c0ef03934632ebe897d8c2ebee2f9af53e168ed8 (patch) | |
tree | 2cd23d1a9394855258d4532dbafa60ccde8557d4 /src/quicktemplates2/qquickswipedelegate.cpp | |
parent | 4ab5b4de70a91e26c1736fa5757a4124b15bab3c (diff) |
QQuickSwipeDelegate: disable touch events to fix swiping on touch
Don't allow QQuickControl to accept touch events, because
QQuickSwipeDelegate is still based on synthesized mouse events.
Change-Id: I750ab3b602882ff9d34e013bc08ed4584482138f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickswipedelegate.cpp')
-rw-r--r-- | src/quicktemplates2/qquickswipedelegate.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp index 97a784b6..b17236bc 100644 --- a/src/quicktemplates2/qquickswipedelegate.cpp +++ b/src/quicktemplates2/qquickswipedelegate.cpp @@ -1210,6 +1210,13 @@ void QQuickSwipeDelegate::mouseReleaseEvent(QMouseEvent *event) QQuickItemDelegate::mouseReleaseEvent(event); } +void QQuickSwipeDelegate::touchEvent(QTouchEvent *event) +{ + // Don't allow QQuickControl accept the touch event, because QQuickSwipeDelegate + // is still based on synthesized mouse events + event->ignore(); +} + void QQuickSwipeDelegate::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { Q_D(QQuickSwipeDelegate); |