QGraphicsSceneContextMenuEvent Class
QGraphicsSceneContextMenuEvent クラスは、グラフィックスビューフレームワークのコンテキストメニューイベントを提供します。詳細...
ヘッダー | #include <QGraphicsSceneContextMenuEvent> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
継承: | QGraphicsSceneEvent |
パブリックな型
enum | Reason { Mouse, Keyboard, Other } |
パブリック関数
virtual | ~QGraphicsSceneContextMenuEvent() |
Qt::KeyboardModifiers | modifiers() const |
QPointF | pos() const |
QGraphicsSceneContextMenuEvent::Reason | reason() const |
QPointF | scenePos() const |
QPoint | screenPos() const |
詳細説明
QGraphicsView によって受信されたQContextMenuEvent は、QGraphicsSceneContextMenuEvent に変換されます。QContextMenuEvent::globalPos() は、アイテム、シーン、およびスクリーン座標 (pos(),scenePos(),screenPos()) に変換されます。
QGraphicsSceneMouseEvent 、QGraphicsSceneWheelEvent 、QContextMenuEventも参照 。
メンバ型ドキュメント
enum QGraphicsSceneContextMenuEvent::Reason
この列挙型は、コンテキストイベントが送信された理由を記述する。
定数 | 値 | 説明 |
---|---|---|
QGraphicsSceneContextMenuEvent::Mouse | 0 | マウスによってイベントが送られました。ほとんどのプラットフォームでは、これはマウスの右ボタンがクリックされたことを意味します。 |
QGraphicsSceneContextMenuEvent::Keyboard | 1 | キーボードによってこのイベントが送られた。WindowsとmacOSでは、メニューボタンが押されたことを意味する。 |
QGraphicsSceneContextMenuEvent::Other | 2 | マウスやキーボードではない)他の手段でイベントが送られた。 |
メンバー関数ドキュメント
[virtual noexcept]
QGraphicsSceneContextMenuEvent::~QGraphicsSceneContextMenuEvent()
イベントを破壊する。
Qt::KeyboardModifiers QGraphicsSceneContextMenuEvent::modifiers() const
コンテキストメニューが要求されたときに使用されていたキーボード修飾子を返します。
QPointF QGraphicsSceneContextMenuEvent::pos() const
コンテキストメニューが要求された瞬間のマウスカーソルの位置をアイテム座標で返す。
scenePos() およびscreenPos()も参照 。
QGraphicsSceneContextMenuEvent::Reason QGraphicsSceneContextMenuEvent::reason() const
コンテキストメニューイベントの理由を返します。
QGraphicsSceneContextMenuEvent::Reasonも参照ください 。
QPointF QGraphicsSceneContextMenuEvent::scenePos() const
コンテキストメニューが要求された瞬間のマウスカーソルの位置をシーン座標で返す。
pos() およびscreenPos()も参照して ください。
QPoint QGraphicsSceneContextMenuEvent::screenPos() const
コンテキストメニューが要求された瞬間のマウスカーソルの位置をスクリーン座標で返す。
© 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.