Obsolete Members for QPixmapCache

以下成员源于类 QPixmapCache 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

静态公共成员

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

成员函数文档编制

[static] 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.

使用 remove(key); key = insert(pixmap); 代替。

替换的像素图关联给定 key 采用 pixmap 指定。返回 true pixmap 已正确插入缓存;否则返回 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.

另请参阅 setCacheLimit () 和 insert ().