Pages
API Documentation
On this page

DragDropEvent QML Type

QML helpers for Drag and Drop. More...

  • Import Statement: import org.kde.draganddrop

Detailed Description

Property Documentation

buttons : int

The pressed mouse buttons. A combination of:

Constant Description
Qt.NoButton The button state does not refer to any button (see QMouseEvent::button()).
Qt.LeftButton The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.)
Qt.RightButton The right button.
Qt.MidButton The middle button.
Qt.MiddleButton MidButton The middle button.
Qt.XButton1 The first X button.
Qt.XButton2 The second X button.

mimeData : MimeData

The mime data of this operation

See also MimeData

modifiers : int

Pressed keyboard modifiers, a combination of:

Constant Description
Qt.NoModifier No modifier key is pressed.
Qt.ShiftModifier A Shift key on the keyboard is pressed.
Qt.ControlModifier A Ctrl key on the keyboard is pressed.
Qt.AltModifier An Alt key on the keyboard is pressed.
Qt.MetaModifier A Meta key on the keyboard is pressed.
Qt.KeypadModifier A keypad button is pressed.
Qt.GroupSwitchModifier X11 only. A Mode_switch key on the keyboard is pressed.

possibleActions : Qt::DropActions

The possible kinds of action that can be done in the drop, a combination of:

Constant Description
Qt.CopyAction 0x1 Copy the data to the target.
Qt.MoveAction 0x2 Move the data from the source to the target.
Qt.LinkAction 0x4 Create a link from the source to the target.
Qt.ActionMask 0xff
Qt.IgnoreAction 0x0 Ignore the action (do nothing with the data).
Qt.TargetMoveAction 0x8002 On Windows, this value is used when the ownership of the D&D data should be taken over by the target application, i.e., the source application should not delete the data. On X11 this value is used to do a move. TargetMoveAction is not used on the Mac.

proposedAction : Qt::DropAction

Default action

See also possibleActions

x : int

The mouse X position of the event relative to the DropArea that is receiving the event.

y : int

The mouse Y position of the event relative to the DropArea that is receiving the event.

Method Documentation

accept(int action)

ignore()

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.