QSinglePointEvent
Hierarchy
↳ QSinglePointEvent
Index
Constructors
Properties
Methods
- accept
- button
- buttons
- globalPosition
- ignore
- isAccepted
- modifiers
- position
- scenePosition
- setAccepted
- spontaneous
- timestamp
- type
Constructors
constructor
+ new QSinglePointEvent(native
: NativeElement): QSinglePointEvent
Inherited from QEvent.constructor
Parameters:
Name | Type |
---|---|
native | NativeElement |
Returns: QSinglePointEvent
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
button
▸ button(): number
Returns: number
buttons
▸ buttons(): number
Returns: number
globalPosition
▸ globalPosition(): object
Returns the global position of the mouse pointer at the time of the event. This is important on asynchronous window systems such as X11; whenever you move your widgets around in response to mouse events, globalPosition() can differ a lot from the current cursor position returned by QCursor::pos().
Returns: object
-
x: number
-
y: number
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
Inherited from QEvent.isAccepted
Returns: boolean
modifiers
▸ modifiers(): KeyboardModifier
Inherited from QInputEvent.modifiers
Returns: KeyboardModifier
position
▸ position(): object
Returns the position of the mouse cursor relative to the widget that received the event. If you move your widgets around in response to mouse events, use globalPosition() instead of this function. This function was introduced in Qt 5.14
Returns: object
-
x: number
-
y: number
scenePosition
▸ scenePosition(): object
Returns: object
-
x: number
-
y: number
setAccepted
▸ setAccepted(accepted
: boolean): void
Inherited from QEvent.setAccepted
Sets the accept flag of the event object
Parameters:
Name | Type |
---|---|
accepted | boolean |
Returns: void
spontaneous
▸ 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
timestamp
▸ timestamp(): number
Inherited from QInputEvent.timestamp
Returns: number
type
▸ type(): number
Returns the event type
Returns: number
This is QEvent::Type