Key 類

class QPixmapCache ::Key

The QPixmapCache::Key 類可以用於有效訪問 QPixmapCache . 更多...

公共函數

Key ()
~Key ()
bool isValid () const
void swap (QPixmapCache::Key & other )
(從 6.6 起) size_t qHash (const QPixmapCache::Key & key , size_t seed = 0)

詳細描述

使用 QPixmapCache::insert () to receive an instance of Key generated by the pixmap cache. You can store the key in your own objects for a very efficient one-to-one object-to-pixmap mapping.

成員函數文檔編製

Key:: Key ()

構造空的 Key 對象。

[noexcept] Key:: ~Key ()

銷毀 Key。

[noexcept] bool Key:: isValid () const

返迴 true if there is a cached pixmap associated with this key. Otherwise, if pixmap was flushed, the key is no longer valid.

[noexcept] void Key:: swap ( QPixmapCache::Key & other )

Swaps this key with other 。此操作很快且從不失敗。

相關非成員

[noexcept, since 6.6] size_t qHash (const QPixmapCache::Key & key , size_t seed = 0)

返迴哈希值為 key ,使用 seed 做計算種子。

該函數在 Qt 6.6 引入。