- Qt 5.15
- Qt GUI
- C++ Classes
- QRegion
- Qt 5.15.19 Reference Documentation

# Obsolete Members for QRegion

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

## Public Functions

`(obsolete)` QRegion | eor(const QRegion &r) const
`(obsolete)` QRegion | intersect(const QRegion &r) const
`(obsolete)` QRegion | intersect(const QRect &rect) const
`(obsolete)` QVector<QRect> | rects() const
`(obsolete)` QRegion | subtract(const QRegion &r) const
`(obsolete)` QRegion | unite(const QRegion &r) const
`(obsolete)` QRegion | unite(const QRect &rect) const

## Member Function Documentation

### QRegion QRegion::eor(const QRegion &r) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use xored(r) instead.

### QRegion QRegion::intersect(const QRegion &r) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use intersected(r) instead.

### QRegion QRegion::intersect(const QRect &rect) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use intersected(rect) instead.

This function was introduced in Qt 4.4.

### QVector<QRect> QRegion::rects() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use begin() and end() instead.

Returns an array of non-overlapping rectangles that make up the region.

The union of all the rectangles is equal to the original region.

See also setRects().

### QRegion QRegion::subtract(const QRegion &r) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use subtracted(r) instead.

### QRegion QRegion::unite(const QRegion &r) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use united(r) instead.

### QRegion QRegion::unite(const QRect &rect) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use united(rect) instead.

This function was introduced in Qt 4.4.