touchPress

touchPress(objectOrName, x, y)

touchPress(objectOrName, x, y, modifiers)

This function performs a touch-based press operation. It replays a touch press on the specified objectOrName widget at position x and y (in the objectOrName widget's coordinates).

If specified, the keyboard modifiers provided in modifiers are set while performing the operation.

Since the object and Qt itself rely on press and release operations to always happen in pairs a call to touchPress should always be paired with a call to touchRelease to ensure a consistent state. For most cases using just tapObject is sufficient.

A single touch press can be performed on objects of type QQuickItem and QWindow.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Search Results