内容表

上一话题

QGraphicsSceneEvent

下一话题

QGraphicsSceneHoverEvent

QGraphicsSceneHelpEvent

QGraphicsSceneHelpEvent class provides events when a tooltip is requested. 更多

Inheritance diagram of PySide2.QtWidgets.QGraphicsSceneHelpEvent

概要

函数

详细描述

QGraphicsView 接收 QEvent of type ToolTip , it creates a QGraphicsSceneHelpEvent , which is forwarded to the scene. You can set a tooltip on a QGraphicsItem with setToolTip() ; by default QGraphicsScene displays the tooltip of the QGraphicsItem with the highest z-value (i.e, the top-most item) under the mouse position.

QGraphicsView does not forward events when "What's This" and status tip help is requested. If you need this, you can reimplement viewportEvent() and forward QStatusTipEvent events and QEvents of type WhatsThis to the scene.

另请参阅

QEvent

class QGraphicsSceneHelpEvent ( [ type=None ] )
param type

Type

Constructs a graphics scene help event of the specified type .

PySide2.QtWidgets.QGraphicsSceneHelpEvent. scenePos ( )
返回类型

QPointF

Returns the position of the mouse cursor in scene coordinates at the moment the help event was sent.

另请参阅

screenPos()

PySide2.QtWidgets.QGraphicsSceneHelpEvent. screenPos ( )
返回类型

QPoint

Returns the position of the mouse cursor in screen coordinates at the moment the help event was sent.

另请参阅

scenePos()

PySide2.QtWidgets.QGraphicsSceneHelpEvent. setScenePos ( pos )
参数

pos QPointF

另请参阅

scenePos()

PySide2.QtWidgets.QGraphicsSceneHelpEvent. setScreenPos ( pos )
参数

pos QPoint

另请参阅

screenPos()