QPixmapCache::Key Class
class QPixmapCache::KeyQPixmapCache::Key 类可用于高效访问QPixmapCache 。更多内容...
公共函数
相关的非成员
(since 6.6) size_t | qHash(const QPixmapCache::Key &key, size_t seed = 0) |
详细说明
使用QPixmapCache::insert() 获取由像素图缓存生成的 Key 实例。您可以将该键存储在自己的对象中,以实现非常高效的“对象到像素图”的一对一映射。
成员函数文档
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.