Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.2
-
None
Description
void QQuickDragHandler::handlePointerEventImpl(QQuickPointerEvent *event) { QQuickMultiPointHandler::handlePointerEventImpl(event); event->setAccepted(true); if (active()) { // Calculate drag delta, taking into account the axis enabled constraint // i.e. if xAxis is not enabled, then ignore the horizontal component of the actual movement QVector2D accumulatedDragDelta = QVector2D(m_centroid.scenePosition() - m_centroid.scenePressPosition()); if (!m_xAxis.enabled()) accumulatedDragDelta.setX(0); if (!m_yAxis.enabled()) accumulatedDragDelta.setY(0); setTranslation(accumulatedDragDelta); } else { ...
setTranslation() is called only when handling a mouse move after the DragHandler already became active. So after the first mouse movement, if you have dragged past the threshold, the target moves, but translation() returns (0, 0). This came up while writing a nice simple single-move autotest for QTBUG-74966.
Attachments
Issue Links
- resulted from
-
QTBUG-74966 DragHandler makes its target jump if you start dragging in the margin area
- Closed