startDrag
startDrag(source_objectOrName, sx, sy)
startDrag(source_objectOrName)
This function initiates a drag on the source_objectOrName
widget starting at position sx
and sy
(in the source_objectOrName
widget's coordinates, if omitted the widget's center is taken). The drop can be done using the dropOn(target_objectOrName, tx, ty, operation) function.
Normally the dragAndDrop(source_objectOrName, sx, sy, target_objectOrName, tx, ty, operation) 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, operation)
© 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.