class QMouseHandler

Provides a means of being notified about mouse events when attached to a QMouseDevice instance. More

Inheritance diagram of PySide6.Qt3DInput.Qt3DInput.QMouseHandler

Synopsis

Properties

Methods

Slots

Signals

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

Note

QMouseHandler components shouldn’t be shared, not respecting that condition will most likely result in undefined behaviors.

See also

QMouseDevice QMouseEvent

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property containsMouseᅟ: bool

Holds true if the QMouseHandler currently contains the mouse.

Note

In this context, contains mean that the ray originating from the mouse is intersecting with the QEntity that aggregates the current QMouseHandler instance component.

Access functions:
property sourceDeviceᅟ: QMouseDevice

Holds the current mouse source device of the QMouseHandler instance.

Access functions:
__init__([parent=None])
Parameters:

parentQNode

Constructs a new QMouseHandler instance with parent parent.

clicked(mouse)
Parameters:

mouseQMouseEvent

This signal is emitted when a mouse button is clicked with the event details being contained within mouse.

containsMouse()
Return type:

bool

Getter of property containsMouseᅟ .

containsMouseChanged(containsMouse)
Parameters:

containsMouse – bool

Notification signal of property containsMouseᅟ .

doubleClicked(mouse)
Parameters:

mouseQMouseEvent

This signal is emitted when a mouse button is double clicked with the event details being contained within mouse.

entered()
exited()
positionChanged(mouse)
Parameters:

mouseQMouseEvent

This signal is emitted when the mouse position changes with the event details being contained within mouse

pressAndHold(mouse)
Parameters:

mouseQMouseEvent

This signal is emitted when a mouse button is pressed and held down with the event details being contained within mouse

pressed(mouse)
Parameters:

mouseQMouseEvent

This signal is emitted when a mouse button is pressed with the event details being contained within mouse

released(mouse)
Parameters:

mouseQMouseEvent

This signal is emitted when a mouse button is released with the event details being contained within mouse

setContainsMouse(contains)
Parameters:

contains – bool

setSourceDevice(mouseDevice)
Parameters:

mouseDeviceQMouseDevice

Sets the mouse device of the QMouseHandler instance to mouseDevice.

See also

sourceDevice()

Setter of property sourceDeviceᅟ .

sourceDevice()
Return type:

QMouseDevice

See also

setSourceDevice()

Getter of property sourceDeviceᅟ .

sourceDeviceChanged(mouseDevice)
Parameters:

mouseDeviceQMouseDevice

Notification signal of property sourceDeviceᅟ .

wheel(wheel)
Parameters:

wheelQWheelEvent

This signal is emitted when the mouse wheel is used with the event details being contained within wheel