- Qt 6.6
- Qt Quick
- C++ Classes
- QQuickItem
- Qt 6.6.3 Reference Documentation

# Obsolete Members for QQuickItem

The following members of class QQuickItem are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(deprecated)` void | grabMouse()
`(deprecated)` void | grabTouchPoints(const QList<int> &ids)
`(deprecated)` void | ungrabMouse()
`(deprecated)` void | ungrabTouchPoints()

## Member Function Documentation

### void QQuickItem::grabMouse()

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

Use QPointerEvent::setExclusiveGrabber().

Grabs the mouse input.

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.

Warning: 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.

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

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