このページでは

QPixmapCache::Key Class

class QPixmapCache::Key

QPixmapCache::Key クラスを使用すると、QPixmapCache への効率的なアクセスが可能になります。詳細...

パブリック関数

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

詳細な説明

QPixmapCache::insert() を使用すると、ピクマップキャッシュによって生成された Key のインスタンスを取得できます。このキーを独自のオブジェクトに格納することで、オブジェクトとピクマップの 1 対 1 のマッピングを非常に効率的に行うことができます。

メンバ関数のドキュメント

Key::Key()

空の Key オブジェクトを生成します。

[noexcept] Key::~Key()

鍵を破棄します。

[noexcept] bool Key::isValid() const

このキーに関連付けられたキャッシュされたピクマップが存在する場合、true を返します。そうでない場合、ピクマップがフラッシュされたため、そのキーはもはや有効ではありません。

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

このキーをother と入れ替えます。この操作は非常に高速で、失敗することはありません。

関連する非会員

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

key のハッシュ値を返します。計算のシードにはseed を使用します。

この関数は Qt 6.6 で導入されました。

© 2026 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.