QMouseHandler#
Provides a means of being notified about mouse events when attached to a QMouseDevice
instance. More…
Synopsis#
Properties#
Functions#
def
containsMouse
()def
setContainsMouse
(contains)def
sourceDevice
()
Slots#
def
setSourceDevice
(mouseDevice)
Signals#
def
clicked
(mouse)def
containsMouseChanged
(containsMouse)def
doubleClicked
(mouse)def
entered
()def
exited
()def
positionChanged
(mouse)def
pressAndHold
(mouse)def
pressed
(mouse)def
released
(mouse)def
sourceDeviceChanged
(mouseDevice)def
wheel
(wheel)
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
- class PySide6.Qt3DInput.Qt3DInput.QMouseHandler([parent=None])#
- Parameters:
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Constructs a new QMouseHandler
instance with parent parent
.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.Qt3DInput.Qt3DInput.QMouseHandler.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:
Signal
containsMouseChanged
(containsMouse)
- property PᅟySide6.Qt3DInput.Qt3DInput.QMouseHandler.sourceDevice: PySide6.Qt3DInput.Qt3DInput.QMouseDevice#
Holds the current mouse source device of the QMouseHandler
instance.
- Access functions:
sourceDevice
()setSourceDevice
(mouseDevice)Signal
sourceDeviceChanged
(mouseDevice)
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.clicked(mouse)#
- Parameters:
This signal is emitted when a mouse button is clicked with the event details being contained within mouse
.
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.containsMouse()#
- Return type:
bool
Getter of property containsMouse
.
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.containsMouseChanged(containsMouse)#
- Parameters:
containsMouse – bool
Notification signal of property containsMouse
.
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.doubleClicked(mouse)#
- Parameters:
This signal is emitted when a mouse button is double clicked with the event details being contained within mouse
.
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.entered()#
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.exited()#
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.positionChanged(mouse)#
- Parameters:
This signal is emitted when the mouse position changes with the event details being contained within mouse
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.pressAndHold(mouse)#
- Parameters:
This signal is emitted when a mouse button is pressed and held down with the event details being contained within mouse
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.pressed(mouse)#
- Parameters:
This signal is emitted when a mouse button is pressed with the event details being contained within mouse
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.released(mouse)#
- Parameters:
This signal is emitted when a mouse button is released with the event details being contained within mouse
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.setContainsMouse(contains)#
- Parameters:
contains – bool
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.setSourceDevice(mouseDevice)#
- Parameters:
mouseDevice –
PySide6.Qt3DInput.Qt3DInput.QMouseDevice
Sets the mouse device of the QMouseHandler
instance to mouseDevice
.
See also
Setter of property sourceDevice
.
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.sourceDevice()#
- Return type:
See also
Getter of property sourceDevice
.
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.sourceDeviceChanged(mouseDevice)#
- Parameters:
mouseDevice –
PySide6.Qt3DInput.Qt3DInput.QMouseDevice
Notification signal of property sourceDevice
.
- PySide6.Qt3DInput.Qt3DInput.QMouseHandler.wheel(wheel)#
- Parameters:
This signal is emitted when the mouse wheel is used with the event details being contained within wheel