mouseDrag
mouseDrag(objectOrName, dx, dy)
mouseDrag(objectOrName, x, y, dx, dy)
mouseDrag(objectOrName, x, y, dx, dy, mouseButton)
mouseDrag(objectOrName, x, y, dx, dy, mouseButton, modifierState)
This function performs a mouse drag from the objectOrName
widget to a position that is horizontally offset by dx
pixels and vertically offset by dy
pixels from the object's center (or from position x
, y
in the objectOrName
widget's coordinates if these are specified). If you need to specify the mouse button or modifier state but don't want to specify the origin (because the center of the object is sufficient), pass 0 for the x
coordinate and for the y
coordinate.
By default the mouse is dragged from the middle of the object, but this can be changed by passing object-relative coordinates, x
and y
. The amount to drag, dx
, dy
, must be specified. By default MouseButton.LeftButton
is used, but this can be changed by specifying the optional mouseButton
argument. Similarly a default modifier state of Modifier.NoModifier
is used, but this can be changed by specifying the modifierState
argument. Note that to specify the modifier, the button must also be specified. See Windows Convenience Function Parameters for which values are valid for the mouseButton
argument and for the modifierState
argument.
© 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.