Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.0.0 Beta2
-
None
Description
Imagine swiping a finger across a big touchscreen, sometimes touching and sometimes not. There are no events when the finger is hovering, only when it's touching; nevertheless, the finger has velocity, even though we can't measure it. So it seems fair to assume that the velocity on press is related to the velocity on the previous release, if it occurs within a short time. But currently the Kalman filter in QMutableEventPoint::setTimestamp() may not be simulating (an assumed) deceleration very well; this needs more testing. If there were no events for some short interval, we should probably "prorate" the velocity back to zero.
You could do this with a physical mouse too: drag across a desktop at a constant speed but tap the buttons intermittently. And in this case, we do get events for the moves between the taps; so the simulation of deceleration is not needed, because we measure it directly, as long as we receive all the mouse move events (when it leaves the window, usually we don't get them anymore).
In autotests, residual velocity is annoying: it is a way that one test case can affect another. And we don't want to add delays to make the tests run as slow as real users would run them. So it seems we need a way to reset velocity between test cases, at least. It should be automatic somehow so that we don't have to modify a lot of tests.
We could also reset it to zero on release, but that doesn't seem physically accurate, and in fact I think the mouse or touch release event itself should be delivered with the velocity that the eventpoint had at the time of release: the same velocity from the previous move event.
Attachments
Issue Links
- relates to
-
QTBUG-104471 tst_QQuickListView2::tapDelegateDuringFlicking fails on Android
- Reported
Gerrit Reviews
For Gerrit Dashboard: QTBUG-88346 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
320799,5 | Add tst_QHighDpi::mouseVelocity() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
321117,3 | Reset the velocity Kalman filter when the mouse enters a window | dev | qt/qtbase | Status: MERGED | +2 | 0 |