QPickEvent#

The QPickEvent class holds information when an object is picked. More

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QPickEvent

Inherited by: QPickTriangleEvent, QPickPointEvent, QPickLineEvent

Synopsis#

Properties#

Functions#

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#

This is received as a parameter in most of the QObjectPicker component signals when picking succeeds.

See also

QPickingSettings QPickTriangleEvent QObjectPicker

class PySide6.Qt3DRender.Qt3DRender.QPickEvent#

PySide6.Qt3DRender.Qt3DRender.QPickEvent(position, worldIntersection, localIntersection, distance)

PySide6.Qt3DRender.Qt3DRender.QPickEvent(position, worldIntersection, localIntersection, distance, button, buttons, modifiers)

Parameters:

Constructs a new QPickEvent .

Constructs a new QPickEvent with the given parameters: position, intersection, localIntersection and distance

Constructs a new QPickEvent with the given parameters: position, worldIntersection, localIntersection, distance, button, buttons and modifiers

Note

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

property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.accepted: bool#

Specifies if event has been accepted

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.button: Buttons#

Specifies mouse button that caused the event

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.buttons: int#

Specifies state of the mouse buttons for the event

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.distance: float#

Specifies the distance of the hit to the camera

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.entity: PySide6.Qt3DCore.Qt3DCore.QEntity#

The entity that the picked geometry belongs to.

If the object picker is not attached to a leaf node in the scene graph, this is useful to find which child entity was actually picked.

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.localIntersection: PySide6.QtGui.QVector3D#

Specifies the coordinates of the hit in the local coordinate system of the picked entity

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.modifiers: int#

Specifies state of the mouse buttons for the event

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.position: PySide6.QtCore.QPointF#

Specifies the mouse position with respect to the render area (window or quick item)

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.viewport: PySide6.Qt3DRender.Qt3DRender.QViewport#

The viewport in which this event originated. A null value means the event originated from a frame graph branch without a QViewport . If a frame graph branch has a Viewport inside a Viewport the property will contain the leaf viewport.

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QPickEvent.worldIntersection: PySide6.QtGui.QVector3D#

Specifies the coordinates of the hit in world coordinate system

Access functions:
PySide6.Qt3DRender.Qt3DRender.QPickEvent.Buttons#

Constant

Description

Qt3DRender.QPickEvent.LeftButton

Qt3DRender.QPickEvent.RightButton

Qt3DRender.QPickEvent.MiddleButton

Qt3DRender.QPickEvent.BackButton

Qt3DRender.QPickEvent.NoButton

PySide6.Qt3DRender.Qt3DRender.QPickEvent.Modifiers#

Constant

Description

Qt3DRender.QPickEvent.NoModifier

Qt3DRender.QPickEvent.ShiftModifier

Qt3DRender.QPickEvent.ControlModifier

Qt3DRender.QPickEvent.AltModifier

Qt3DRender.QPickEvent.MetaModifier

Qt3DRender.QPickEvent.KeypadModifier

PySide6.Qt3DRender.Qt3DRender.QPickEvent.acceptedChanged(accepted)#
Parameters:

accepted – bool

Notification signal of property accepted .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.button()#
Return type:

Buttons

QPickEvent::button Returns mouse button that caused the event

Getter of property button .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.buttons()#
Return type:

int

QPickEvent::buttons Returns bitfield to be used to check for mouse buttons that may be accompanying the pick event.

Getter of property buttons .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.distance()#
Return type:

float

QPickEvent::distance Returns distance from camera to pick point

Getter of property distance .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.entity()#
Return type:

PySide6.Qt3DCore.Qt3DCore.QEntity

Getter of property entity .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.isAccepted()#
Return type:

bool

QPickEvent::isAccepted Returns true if the event has been accepted

Getter of property accepted .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.localIntersection()#
Return type:

PySide6.QtGui.QVector3D

QPickEvent::localIntersection Returns coordinates of the hit in the local coordinate system of the picked entity

Getter of property localIntersection .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.modifiers()#
Return type:

int

QPickEvent::modifiers Returns bitfield to be used to check for keyboard modifiers that may be accompanying the pick event.

Getter of property modifiers .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.position()#
Return type:

PySide6.QtCore.QPointF

QPickEvent::position Returns mouse pointer coordinate of the pick query

Getter of property position .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.setAccepted(accepted)#
Parameters:

accepted – bool

QPickEvent::setAccepted set if the event has been accepted to accepted

See also

isAccepted()

Setter of property accepted .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.viewport()#
Return type:

PySide6.Qt3DRender.Qt3DRender.QViewport

Getter of property viewport .

PySide6.Qt3DRender.Qt3DRender.QPickEvent.worldIntersection()#
Return type:

PySide6.QtGui.QVector3D

QPickEvent::worldIntersection Returns coordinates of the hit in world coordinate system

Getter of property worldIntersection .