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
ヘルプイベントが送信された時点での、シーン座標系におけるマウスカーソルの位置を返します。
screenPos()も参照してください 。
QPoint QGraphicsSceneHelpEvent::screenPos() const
ヘルプイベントが送信された時点での、画面座標におけるマウスカーソルの位置を返します。
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.