nodeguy/website/docs/api/generated/classes/qdropevent.md
swittk 3cb3424250
Added QMimeData, additional methods to QUrl, and Dropping should now be supported (#614)
* Added QWheelEvent

* removed x y

* Added QNativeGestureEvent

* Changed wrong type of QNativeGestureEventWrap value

* Added QTabletEvent

* Fixing build error for QTabletEvent

* adding dropaction

* fix typos

* Added more functions to QPainterPath

* Added more functions to QPainterPath

* Fixed multiple typos

* Fixed multiple typos

* Got QPainterPath additions working.

* Modified QPainterPath to use qreal instead

* Added QPointF, added a few missing methods to QPoint

* Added QRectF

* implemented QRectF

* Added acceptDrops and setAcceptDrops to QWidget, will be useful for addon implementation of Drag and Drop

* Added more methods to QUrl

* Added QMimeData, additional methods to QUrl, and Dropping should now be supported

* refactored

* Fixed more merge conflicts

* Is this my final merge conflict??

* All merge conflicts resolved

* All merge conflicts resolved

* Adds guide for drag and drop

* lint fix

Co-authored-by: Switt Kongdachalert <switt1995@yahoo.com>
Co-authored-by: Atul R <atulanand94@gmail.com>
2020-06-27 17:35:31 +02:00

4.3 KiB

id title sidebar_label
qdropevent QDropEvent QDropEvent

Hierarchy

  • QDropEvent

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QDropEvent(event: NativeElement): QDropEvent

Parameters:

Name Type
event NativeElement

Returns: QDropEvent

Properties

native

native: NativeElement

Methods

accept

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

acceptProposedAction(): void

Sets the drop action to be the proposed action

Returns: void


dropAction

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

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

isAccepted(): boolean

Returns: boolean


keyboardModifiers

keyboardModifiers(): number

Returns the modifier keys that are pressed

see Qt::KeyboardModifier for flags

Returns: number


mimeData

mimeData(): QMimeData

Returns the data that was dropped on the widget and its associated MIME type information

Returns: QMimeData


mouseButtons

mouseButtons(): number

Returns the mouse buttons that are pressed

See Qt::MouseButton for flags

Returns: number


pos

pos(): object

Returns the position where the drop was made

Returns: object

  • x: number

  • y: number


posF

posF(): object

Returns the position where the drop was made

Returns: object

  • x: number

  • y: number


possibleActions

possibleActions(): number

Returns an OR-combination of possible drop actions.

See Qt::DropAction for flags

Returns: number


proposedAction

proposedAction(): DropAction

Returns the proposed drop action

Returns: DropAction


setAccepted

setAccepted(accepted: boolean): void

Sets the accept flag of the event object

Parameters:

Name Type
accepted boolean

Returns: void


setDropAction

setDropAction(action: DropAction): void

Parameters:

Name Type
action DropAction

Returns: void


spontaneous

spontaneous(): boolean

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

type(): number

Returns the event type

Returns: number

This is QEvent::Type