QGraphicsSceneHelpEvent Class
QGraphicsSceneHelpEventクラスは、ツールチップが要求されたときのイベントを提供します。詳細...
ヘッダー | #include <QGraphicsSceneHelpEvent> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
継承: | QGraphicsSceneEvent |
パブリック関数
virtual | ~QGraphicsSceneHelpEvent() |
QPointF | scenePos() const |
QPoint | screenPos() const |
詳細説明
QGraphicsView がQEvent::ToolTip 型のQEvent を受信すると、QGraphicsSceneHelpEvent が作成され、シーンに転送されます。setToolTip() を使用して、QGraphicsItem にツールチップを設定できます。デフォルトでは、QGraphicsScene は、マウス位置の下で最も高い z 値(つまり、最も上のアイテム)を持つQGraphicsItem のツールチップを表示します。
QGraphicsView は、 と のヘルプが要求されたとき、イベントを転送しません。これが必要な場合は、 () を再実装し、 イベントと タイプの をシーンに転送することができます。"What's This" status tip QGraphicsView::viewportEvent QStatusTipEvent QEvent::WhatsThis QEvents
QEventも参照 。
メンバー関数ドキュメント
[virtual noexcept]
QGraphicsSceneHelpEvent::~QGraphicsSceneHelpEvent()
イベントを破壊する。
QPointF QGraphicsSceneHelpEvent::scenePos() const
help イベントが送られた瞬間のマウスカーソルの位置をシーン座標で返す。
screenPos()も参照してください 。
QPoint QGraphicsSceneHelpEvent::screenPos() const
help イベントが送られた瞬間のマウスカーソルの位置をスクリーン座標で返す。
scenePos()も参照してください 。
© 2025 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.