Nesta página

QPixmapCache::Key Class

class QPixmapCache::Key

A classe ` QPixmapCache::Key ` pode ser usada para acessar de forma eficiente o ` QPixmapCache`. Mais...

Funções públicas

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

Descrição detalhada

Use QPixmapCache::insert() para receber uma instância de Key gerada pelo cache de pixmap. Você pode armazenar a chave em seus próprios objetos para obter um mapeamento objeto-para-pixmap um-para-um muito eficiente.

Documentação da função de membro

Key::Key()

Cria um objeto Key vazio.

[noexcept] Key::~Key()

Destrói a chave.

[noexcept] bool Key::isValid() const

Retorna ` true ` se houver um pixmap armazenado em cache associado a essa chave. Caso contrário, se o pixmap tiver sido esvaziado, a chave não será mais válida.

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

Troca esta chave por other. Essa operação é muito rápida e nunca falha.

Relacionado: Não-membros

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

Retorna o valor hash de key, utilizando seed como semente para o cálculo.

Essa função foi introduzida no 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.