Obsolete Members for QHoverEvent

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

公共函数

(deprecated (6.3)) QHoverEvent (QEvent::Type type , const QPointF & pos , const QPointF & oldPos , Qt::KeyboardModifiers modifiers = Qt::NoModifier, const QPointingDevice * device = QPointingDevice::primaryPointingDevice())
(deprecated (6.0)) QPoint pos () const
(deprecated (6.0)) QPointF posF () const

成员函数文档编制

QHoverEvent:: QHoverEvent ( QEvent::Type type , const QPointF & pos , const QPointF & oldPos , Qt::KeyboardModifiers modifiers = Qt::NoModifier, const QPointingDevice * device = QPointingDevice::primaryPointingDevice())

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

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

Constructs a hover event object originating from device .

The type 参数必须是 QEvent::HoverEnter , QEvent::HoverLeave ,或 QEvent::HoverMove .

The pos 是相对于接收 Widget 的当前鼠标光标位置,而 oldPos 是它的先前这种位置。 modifiers 保持事件发生时所有键盘修饰符的状态。

QPoint QHoverEvent:: pos () const

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

使用 position ().toPoint() instead.

返回鼠标光标的位置,相对于接收事件的 Widget。

On QEvent::HoverLeave 事件,此位置将始终是 QPoint (-1, -1).

另请参阅 oldPos ().

QPointF QHoverEvent:: posF () const

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

使用 position () 代替。

返回鼠标光标的位置,相对于接收事件的 Widget。

On QEvent::HoverLeave 事件,此位置将始终是 QPointF (-1, -1).

另请参阅 oldPosF ().