Compatibility Members for QPixmap

The following members of class QPixmapare part of the Qt compatibility layer. We advise against using them in new code.

Public Functions

QPixmap alphaChannel() const
int serialNumber() const
void setAlphaChannel(const QPixmap & p)

Member Function Documentation

QPixmap QPixmap::alphaChannel() const

Most use cases for this can be achieved using a QPainter and QPainter::CompositionMode instead.

See also setAlphaChannel().

int QPixmap::serialNumber() const

Returns a number that identifies the contents of this QPixmap object. Distinct QPixmap objects can only have the same serial number if they refer to the same contents (but they don't have to).

Use cacheKey() instead.

Warning: The serial number doesn't necessarily change when the pixmap is altered. This means that it may be dangerous to use it as a cache key. For caching pixmaps, we recommend using the QPixmapCache class whenever possible.

void QPixmap::setAlphaChannel(const QPixmap & p)

Most use cases for this can be achieved using p with QPainter and QPainter::CompositionMode instead.

See also alphaChannel().