Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
All the QTest::mouseX() functions have an optional delay argument: https://doc.qt.io/qt-6/qtest.html#mousePress but we don't have it for touch events. Sometimes we need to delay a touch press to avoid double-click detection, for example, or to control the velocity calculation by virtually slowing down the touch moves. This is best done by controlling the event timestamps rather than via actual QTest::qWait() delays: for the sake of speed, and also because it seems like when the variant of QWindowSystemInterface::handleTouchEvent() that does not take a timestamp uses
unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
qWait() doesn't always affect it.
One minor goal for Qt 6 was that QWindowSystemInterface event-handling functions should all take timestamps. handleTouchEvent() still has both variants (one taking a timestamp, and one not). It would be best to eventually remove the one that uses that elapsed() time. But then QTest functions need to always provide timestamps.
Attachments
Issue Links
- relates to
-
QTBUG-60389 QTouchEvents are missing modifiers on most platforms
- Reported
-
QTBUG-63146 qtestlib: cleanups, re-design, API completeness and documentation
- Reported
-
QTBUG-126519 it's not useful that defaultMouseDelay() in QTestLib is 0 by default
- Open
-
QTBUG-129794 QTest::mouseClick() and mouseDClick() don't actually apply the delay to each event in the sequence
- Closed
-
QTBUG-81979 Allow configuring a global QTestLib timeout
- Reported
-
QTBUG-110314 Add QTestRandomNumber that tracks the seed used for reproducability
- Open
-
QTBUG-102441 QuickTest cannot double-click TapHandler
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-95421 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
362286,9 | Add keyboard modifiers and delay to QTest::touchEvent() | dev | qt/qtbase | Status: NEW | 0 | 0 |