Obsolete Members for QContextMenuEvent

以下成员源于类 QContextMenuEvent 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

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

成员函数文档编制

QContextMenuEvent:: QContextMenuEvent ( QContextMenuEvent::Reason reason , const QPoint & pos )

This function is deprecated since 6.4. We strongly advise against using it in new code.

Use the other constructor instead (global position is required).

构造上下文菜单事件对象,采用将 accept (接受) 参数标志设为 false。

The reason 参数必须是 QContextMenuEvent::Mouse or QContextMenuEvent::Keyboard .

The pos 参数指定相对于接收 Widget 的鼠标位置。

The globalPos () 被初始化为 QCursor::pos (),可能不合适。使用其它构造函数以明确指定全局位置。