website/docs/api/generated/classes/qdropevent.md
↳ QDropEvent
+ new QDropEvent(arg: NativeRawPointer‹"QEvent"› | NativeElement): QDropEvent
Overrides QEvent.constructor
Parameters:
| Name | Type |
|---|---|
arg | NativeRawPointer‹"QEvent"› | NativeElement |
Returns: QDropEvent
• native: NativeElement
▸ accept(): void
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget
Returns: void
▸ acceptProposedAction(): void
Sets the drop action to be the proposed action
Returns: void
▸ dropAction(): DropAction
Returns the action to be performed on the data by the target. This may be different from the action supplied in proposedAction() if you have called setDropAction() to explicitly choose a drop action
Returns: DropAction
▸ ignore(): void
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). Clearing the accept parameter indicates that the event receiver does not want the event. Unwanted events might be propagated to the parent widget.
Returns: void
▸ isAccepted(): boolean
Inherited from QEvent.isAccepted
Returns: boolean
▸ keyboardModifiers(): number
Returns the modifier keys that are pressed
see Qt::KeyboardModifier for flags
Returns: number
▸ mimeData(): QMimeData
Returns the data that was dropped on the widget and its associated MIME type information
Returns: QMimeData
▸ mouseButtons(): number
Returns the mouse buttons that are pressed
See Qt::MouseButton for flags
Returns: number
▸ pos(): object
Returns the position where the drop was made
Returns: object
x: number
y: number
▸ posF(): object
Returns the position where the drop was made
Returns: object
x: number
y: number
▸ possibleActions(): number
Returns an OR-combination of possible drop actions.
See Qt::DropAction for flags
Returns: number
▸ proposedAction(): DropAction
Returns the proposed drop action
Returns: DropAction
▸ setAccepted(accepted: boolean): void
Inherited from QEvent.setAccepted
Sets the accept flag of the event object
Parameters:
| Name | Type |
|---|---|
accepted | boolean |
Returns: void
▸ setDropAction(action: DropAction): void
Parameters:
| Name | Type |
|---|---|
action | DropAction |
Returns: void
▸ spontaneous(): boolean
Inherited from QEvent.spontaneous
Returns true if the event originated outside the application (a system event); otherwise returns false.
The return value of this function is not defined for paint events.
Returns: boolean
▸ type(): number
Returns the event type
Returns: number
This is QEvent::Type