このページでは

QGraphicsSceneHoverEvent Class

QGraphicsSceneHoverEvent クラスは、グラフィックスビューフレームワークにおいてホバーイベントを提供します。詳細...

ヘッダー: #include <QGraphicsSceneHoverEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
継承元: QGraphicsSceneEvent

パブリック関数

virtual ~QGraphicsSceneHoverEvent()
QPointF lastPos() const
QPointF lastScenePos() const
QPoint lastScreenPos() const
Qt::KeyboardModifiers modifiers() const
QPointF pos() const
QPointF scenePos() const
QPoint screenPos() const

詳細な説明

QGraphicsView がQHoverEvent イベントを受信すると、それをQGraphicsSceneHoverEventに変換します。その後、そのイベントは、ビューに関連付けられたQGraphicsScene に転送されます。

関連項目: QGraphicsSceneMouseEvent 、QGraphicsSceneContextMenuEvent 、QGraphicsSceneWheelEvent 、およびQHoverEvent 。

メンバ関数のドキュメント

[virtual noexcept] QGraphicsSceneHoverEvent::~QGraphicsSceneHoverEvent()

イベントを削除します。

QPointF QGraphicsSceneHoverEvent::lastPos() const

アイテム座標系における、最後に記録されたマウスカーソルの位置を返します。

lastScenePos()、lastScreenPos()、およびpos()も参照してください 。

QPointF QGraphicsSceneHoverEvent::lastScenePos() const

ビューが受信した、直近のマウスまたはホバーイベントのうち、イベントを発生させたマウスカーソルの位置をシーン座標で表した、最後に記録されたシーン座標を返します。

lastPos()、lastScreenPos()、およびscenePos()も参照してください 。

QPoint QGraphicsSceneHoverEvent::lastScreenPos() const

最後に記録されたマウスカーソルの位置を画面座標で返します。最後に記録された位置とは、そのイベントを生成したビューが受信した直前のマウスイベントまたはホバーイベントの位置を指します。

lastPos()、lastScenePos()、およびscreenPos()も参照してください 。

Qt::KeyboardModifiers QGraphicsSceneHoverEvent::modifiers() const

ホバーイベントが送信された時点でのキーボード修飾子を返します。

QPointF QGraphicsSceneHoverEvent::pos() const

ホバーイベントが送信された時点での、アイテム座標系におけるマウスカーソルの位置を返します。

scenePos() およびscreenPos()も参照してください 。

QPointF QGraphicsSceneHoverEvent::scenePos() const

ホバーイベントが送信された時点における、シーン座標系でのマウスカーソルの位置を返します。

pos() およびscreenPos()も参照してください 。

QPoint QGraphicsSceneHoverEvent::screenPos() const

hover イベントが送信された時点での、画面座標におけるマウスカーソルの位置を返します。

pos() およびscenePos()も参照してください 。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.