PySide.QtGui.QGraphicsSceneHelpEvent class provides events when a tooltip is requested.
当 PySide.QtGui.QGraphicsView 接收 PySide.QtCore.QEvent of type QEvent.ToolTip , it creates a PySide.QtGui.QGraphicsSceneHelpEvent , which is forwarded to the scene. You can set a tooltip on a PySide.QtGui.QGraphicsItem with PySide.QtGui.QGraphicsItem.setToolTip() ; by default PySide.QtGui.QGraphicsScene displays the tooltip of the PySide.QtGui.QGraphicsItem with the highest z-value (i.e, the top-most item) under the mouse position.
PySide.QtGui.QGraphicsView does not forward events when "What's This" and status tip help is requested. If you need this, you can reimplement QGraphicsView.viewportEvent() and forward PySide.QtGui.QStatusTipEvent events and QEvents of type QEvent.WhatsThis to the scene.
另请参阅
| 参数: | type – PySide.QtCore.QEvent.Type |
|---|
Constructs a graphics scene help event of the specified type .
| 返回类型: | PySide.QtCore.QPointF |
|---|
Returns the position of the mouse cursor in scene coordinates at the moment the help event was sent.
| 返回类型: | PySide.QtCore.QPoint |
|---|
Returns the position of the mouse cursor in screen coordinates at the moment the help event was sent.
| 参数: | pos – PySide.QtCore.QPointF |
|---|
Sets the position associated with the context menu to the given point in scene coordinates.
| 参数: | pos – PySide.QtCore.QPoint |
|---|
Sets the position associated with the context menu to the given point in screen coordinates.