Obsolete Members for QPixmapCache

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

Static Public Members

(deprecated in 6.6) bool replace(const QPixmapCache::Key &key, const QPixmap &pixmap)

Member Function Documentation

[static, deprecated in 6.6] bool QPixmapCache::replace(const QPixmapCache::Key &key, const QPixmap &pixmap)

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

Use remove(key); key = insert(pixmap); instead.

Replaces the pixmap associated with the given key with the pixmap specified. Returns true if the pixmap has been correctly inserted into the cache; otherwise returns false.

The passed key is updated to reference pixmap now. Other copies of key, if any, still refer to the old pixmap, which is, however, removed from the cache by this function.

See also setCacheLimit() and insert().

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.