Qt 4.6: Obsolete Members for QGraphicsScene

|  | Home · All Classes · Overviews |

# Obsolete Members for QGraphicsScene

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

- QGraphicsScene class reference

## Properties

- sortCacheEnabled : bool `(obsolete)`

## Public Functions

QGraphicsItem * | itemAt ( const QPointF & position ) const `(obsolete)`
QGraphicsItem * | itemAt ( qreal x, qreal y ) const `(obsolete)`
QList<QGraphicsItem *> | items ( const QPointF & pos ) const `(obsolete)`
QList<QGraphicsItem *> | items ( qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const `(obsolete)`
QList<QGraphicsItem *> | items ( const QRectF & rectangle, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const `(obsolete)`
QList<QGraphicsItem *> | items ( const QPolygonF & polygon, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const `(obsolete)`
QList<QGraphicsItem *> | items ( const QPainterPath & path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const `(obsolete)`
void | setSelectionArea ( const QPainterPath & path ) `(obsolete)`
void | setSelectionArea ( const QPainterPath & path, Qt::ItemSelectionMode mode ) `(obsolete)`

## Property Documentation

### sortCacheEnabled : bool

This property holds whether sort caching is enabled.

Since Qt 4.6, this property has no effect.

This property was introduced in Qt 4.5.

Access functions:

bool | isSortCacheEnabled () const
void | setSortCacheEnabled ( bool enabled )

## Member Function Documentation

### QGraphicsItem * QGraphicsScene::itemAt ( const QPointF & position ) const

This is an overloaded function.

Returns the topmost visible item at the specified position, or 0 if there are no items at this position.

Note: The topmost item is the one with the highest Z-value.

This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead.

See also items(), collidingItems(), and QGraphicsItem::setZValue().

### QGraphicsItem * QGraphicsScene::itemAt ( qreal x, qreal y ) const

This is an overloaded function.

Returns the topmost item at the position specified by (x, y), or 0 if there are no items at this position.

This convenience function is equivalent to calling `itemAt(QPointF(x, y))`.

This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead.

Note: The topmost item is the one with the highest Z-value.

### QList<QGraphicsItem *> QGraphicsScene::items ( const QPointF & pos ) const

Returns all visible items at position pos in the scene. The items are listed in descending stacking order (i.e., the first item in the list is the top-most item, and the last item is the bottom-most item).

This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead.

See also itemAt().

### QList<QGraphicsItem *> QGraphicsScene::items ( qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const

This convenience function is equivalent to calling items(QRectF(x, y, w, h), mode).

This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead.

This function was introduced in Qt 4.3.

### QList<QGraphicsItem *> QGraphicsScene::items ( const QRectF & rectangle, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const

This is an overloaded function.

Returns all visible items that, depending on mode, are either inside or intersect with the specified rectangle.

The default value for mode is Qt::IntersectsItemShape; all items whose exact shape intersects with or is contained by rectangle are returned.

This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead.

See also itemAt().

### QList<QGraphicsItem *> QGraphicsScene::items ( const QPolygonF & polygon, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const

This is an overloaded function.

Returns all visible items that, depending on mode, are either inside or intersect with the polygon polygon.

The default value for mode is Qt::IntersectsItemShape; all items whose exact shape intersects with or is contained by polygon are returned.

This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead.

See also itemAt().

### QList<QGraphicsItem *> QGraphicsScene::items ( const QPainterPath & path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const

This is an overloaded function.

Returns all visible items that, depending on path, are either inside or intersect with the path path.

The default value for mode is Qt::IntersectsItemShape; all items whose exact shape intersects with or is contained by path are returned.

This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead.

See also itemAt().

### void QGraphicsScene::setSelectionArea ( const QPainterPath & path )

This is an overloaded function.

Sets the selection area to path.

This function is deprecated and leads to incorrect results if the scene contains items that ignore transformations. Use the overload that takes a QTransform instead.

### void QGraphicsScene::setSelectionArea ( const QPainterPath & path, Qt::ItemSelectionMode mode )

This is an overloaded function.

Sets the selection area to path using mode to determine if items are included in the selection area.

This function was introduced in Qt 4.3.

See also clearSelection() and selectionArea().