Obsolete Members for QContextMenuEvent

QContextMenuEvent クラスの以下のメンバーは非推奨となっています。これらは、古いソースコードが引き続き動作するように提供されているものです。新しいコードでの使用は強く推奨しません。

パブリック関数

(deprecated in 6.4) QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint &pos)

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

[deprecated in 6.4] QContextMenuEvent::QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint &pos)

この関数はバージョン 6.4 以降、非推奨となっています。新しいコードでの使用は強く推奨しません。

代わりに別のコンストラクタを使用してください(グローバル位置の指定が必要です)。

accept パラメータのフラグが false に設定されたコンテキストメニューイベントオブジェクトを生成します。

reason パラメータは、QContextMenuEvent::Mouse またはQContextMenuEvent::Keyboard のいずれかでなければなりません。

pos パラメータは、受信ウィジェットに対するマウスの相対位置を指定します。

globalPos() はQCursor::pos() で初期化されますが、これは適切でない場合があります。グローバルな位置を明示的に指定するには、他のコンストラクタを使用してください。

© 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.