diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-04-24 10:13:58 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-04-24 10:13:58 +0300 |
commit | c433697a686e7a24dc4bfd58f2a46c05ae7b7716 (patch) | |
tree | 1654ca5e257f752356edc1d7fd0ee3042f50b4a8 /src/quicktemplates2/qquickcontrol.cpp | |
parent | 5e31cdc9dda940aee38cf8de4ddbbeb2c0cebfc7 (diff) | |
parent | 591cf585a3d4c4297f4900553aba612ebd062a04 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.10' into tqtc/lts-5.15-opensourcev5.15.10-lts-lgpl
Change-Id: I1e6656a4356246b153ca4bfb210027ad46242e5a
Diffstat (limited to 'src/quicktemplates2/qquickcontrol.cpp')
-rw-r--r-- | src/quicktemplates2/qquickcontrol.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp index bbbd0e62..409fb582 100644 --- a/src/quicktemplates2/qquickcontrol.cpp +++ b/src/quicktemplates2/qquickcontrol.cpp @@ -179,9 +179,10 @@ bool QQuickControlPrivate::acceptTouch(const QTouchEvent::TouchPoint &point) // If the control is on a Flickable that has a pressDelay, then the press is never // sent as a touch event, therefore we need to check for this case. - if (touchId == -1 && pressWasTouch && point.state() == Qt::TouchPointReleased && - point.pos() == previousPressPos) { - return true; + if (touchId == -1 && pressWasTouch && point.state() == Qt::TouchPointReleased) { + const auto delta = QVector2D(point.pos() - previousPressPos); + if (!QQuickWindowPrivate::dragOverThreshold(delta)) + return true; } return false; } |