Obsolete Members for QPixmapCache

以下成員源於類 QPixmapCache 被棄用。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

靜態公共成員

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

成員函數文檔編製

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

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

替換的像素圖關聯給定 key 采用 pixmap 指定。返迴 truepixmap 已正確插入緩存;否則返迴 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 ().