QGraphicsSceneHelpEventclass provides events when a tooltip is requested. 更多 …
def
scenePos
()
def
screenPos
()
def
setScenePos
(pos)
def
setScreenPos
(pos)
当
QGraphicsView接收QEventof typeToolTip, it creates aQGraphicsSceneHelpEvent, which is forwarded to the scene. You can set a tooltip on aQGraphicsItemwithsetToolTip(); by defaultQGraphicsScenedisplays the tooltip of theQGraphicsItemwith the highest z-value (i.e, the top-most item) under the mouse position.
QGraphicsViewdoes not forward events when"What's This"andstatus tiphelp is requested. If you need this, you can reimplementviewportEvent()and forwardQStatusTipEventevents andQEventsof typeWhatsThisto the scene.另请参阅
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.
另请参阅
PySide2.QtWidgets.QGraphicsSceneHelpEvent.
screenPos
(
)
¶
QPoint
Returns the position of the mouse cursor in screen coordinates at the moment the help event was sent.
另请参阅
PySide2.QtWidgets.QGraphicsSceneHelpEvent.
setScenePos
(
pos
)
¶
pos
–
QPointF
另请参阅
PySide2.QtWidgets.QGraphicsSceneHelpEvent.
setScreenPos
(
pos
)
¶
pos
–
QPoint
另请参阅