Obsolete Members for QQuickItem

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

公共函数

(弃用) void grabMouse ()
(弃用) void grabTouchPoints (const QList<int> & ids )
(弃用) void ungrabMouse ()
(弃用) void ungrabTouchPoints ()

成员函数文档编制

void QQuickItem:: grabMouse ()

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

使用 QPointerEvent::setExclusiveGrabber ().

抓取鼠标输入。

This item will receive all mouse events until ungrabMouse () is called. Usually this function should not be called, since accepting for example a mouse press event makes sure that the following events are delivered to the item. If an item wants to take over mouse events from the current receiver, it needs to call this function.

警告: This function should be used with caution.

void QQuickItem:: grabTouchPoints (const QList < int > & ids )

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

使用 QPointerEvent::setExclusiveGrabber (). Grabs the touch points specified by ids .

These touch points will be owned by the item until they are released. Alternatively, the grab can be stolen by a filtering item like Flickable. Use setKeepTouchGrab () to prevent the grab from being stolen.

void QQuickItem:: ungrabMouse ()

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

使用 QPointerEvent::setExclusiveGrabber ().

Releases the mouse grab following a call to grabMouse ().

Note that this function should only be called when the item wants to stop handling further events. There is no need to call this function after a release or cancel event since no future events will be received in any case. No move or release events will be delivered after this function was called.

void QQuickItem:: ungrabTouchPoints ()

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

Use QEventPoint::setExclusiveGrabber() instead. Ungrabs the touch points owned by this item.