dropOn

dropOn(target_objectOrName, tx, ty, action)

This function performs a drop that was initiated by a call to the startDrag(source_objectOrName, sx, sy) function. It does the drop on the target_objectOrName widget at position tx and ty (in the target_objectOrName widget's coordinates). See dragAndDrop(source_­object­Or­Name, sx, sy, target_­object­Or­Name, tx, ty, action) for possible values of the action parameter.

Normally the dragAndDrop(source_­object­Or­Name, sx, sy, target_­object­Or­Name, tx, ty, action) function is used to perform a drag and drop in a single action. However, in some situations it may be necessary to move the mouse over a different object before the drop can take place. In such cases the test code would look something like this:

startDrag(sourceObject, sx, sy)
mouseMove(otherObject, x, y)
dropOn(targetObject, tx, ty, action)

© 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