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

Functions

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

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

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

Buttons

Returns mouse button that caused the event

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

int

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

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

float

Returns distance from camera to pick point

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

PySide6.Qt3DCore.Qt3DCore.QEntity

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

bool

Returns true if the event has been accepted

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

PySide6.QtGui.QVector3D

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

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

int

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

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

PySide6.QtCore.QPointF

Returns mouse pointer coordinate of the pick query

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

accepted – bool

set if the event has been accepted to accepted

See also

isAccepted()

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

PySide6.Qt3DRender.Qt3DRender.QViewport

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

PySide6.QtGui.QVector3D

Returns coordinates of the hit in world coordinate system