PySide6.Qt3DRender.Qt3DRender.QPickEvent¶
- class QPickEvent¶
The
QPickEventclass holds information when an object is picked. More…Inherited by:
QPickTriangleEvent,QPickPointEvent,QPickLineEventSynopsis¶
Properties¶
Methods¶
def
__init__()def
button()def
buttons()def
distance()def
entity()def
isAccepted()def
modifiers()def
position()def
viewport()
Slots¶
def
setAccepted()
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
QObjectPickercomponent signals when picking succeeds.See also
QPickingSettingsQPickTriangleEventQObjectPicker- class Buttons¶
Constant
Description
Qt3DRender.QPickEvent.LeftButton
Qt3DRender.QPickEvent.RightButton
Qt3DRender.QPickEvent.MiddleButton
Qt3DRender.QPickEvent.BackButton
Qt3DRender.QPickEvent.NoButton
- class Modifiers¶
Constant
Description
Qt3DRender.QPickEvent.NoModifier
Qt3DRender.QPickEvent.ShiftModifier
Qt3DRender.QPickEvent.ControlModifier
Qt3DRender.QPickEvent.AltModifier
Qt3DRender.QPickEvent.MetaModifier
Qt3DRender.QPickEvent.KeypadModifier
Note
Properties can be used directly when
from __feature__ import true_propertyis used or via accessor functions otherwise.- property acceptedᅟ: bool¶
Specifies if event has been accepted
- Access functions:
- property buttonᅟ: Qt3DRender.QPickEvent.Buttons¶
Specifies mouse button that caused the event
- Access functions:
- property buttonsᅟ: int¶
Specifies state of the mouse buttons for the event
- Access functions:
- property distanceᅟ: float¶
Specifies the distance of the hit to the camera
- Access functions:
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:
Specifies the coordinates of the hit in the local coordinate system of the picked entity
- Access functions:
- property modifiersᅟ: int¶
Specifies state of the mouse buttons for the event
- Access functions:
Specifies the mouse position with respect to the render area (window or quick item)
- Access functions:
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:
Specifies the coordinates of the hit in world coordinate system
- Access functions:
- __init__()¶
Constructs a new
QPickEvent.- __init__(position, worldIntersection, localIntersection, distance)
Constructs a new
QPickEventwith the given parameters:position,intersection,localIntersectionanddistance- __init__(position, worldIntersection, localIntersection, distance, button, buttons, modifiers)
Constructs a new
QPickEventwith the given parameters:position,worldIntersection,localIntersection,distance,button,buttonsandmodifiers- acceptedChanged(accepted)¶
- Parameters:
accepted – bool
Notification signal of property
acceptedᅟ.- button()¶
- Return type:
Buttons
QPickEvent::button Returns mouse button that caused the event
Getter of property
buttonᅟ.- 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ᅟ.- distance()¶
- Return type:
float
QPickEvent::distance Returns distance from camera to pick point
Getter of property
distanceᅟ.- entity()¶
- Return type:
QEntity
Getter of property
entityᅟ.- isAccepted()¶
- Return type:
bool
QPickEvent::isAccepted Returns true if the event has been accepted
Getter of property
acceptedᅟ.QPickEvent::localIntersection Returns coordinates of the hit in the local coordinate system of the picked entity
Getter of property
localIntersectionᅟ.- 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ᅟ.QPickEvent::position Returns mouse pointer coordinate of the pick query
Getter of property
positionᅟ.- setAccepted(accepted)¶
- Parameters:
accepted – bool
QPickEvent::setAccepted set if the event has been accepted to
acceptedSee also
isAccepted()Setter of property
acceptedᅟ.- viewport()¶
- Return type:
QViewport
Getter of property
viewportᅟ.QPickEvent::worldIntersection Returns coordinates of the hit in world coordinate system
Getter of property
worldIntersectionᅟ.