- Qt 6.6
- Qt GUI
- C++ Classes
- Key
- Qt 6.6.0 Reference Documentation

# Key Class

class QPixmapCache::Key

The QPixmapCache::Key class can be used for efficient access to the QPixmapCache. More...

- List of all members, including inherited members

## Public Functions

| Key()
| ~Key()
bool | isValid() const

## Detailed Description

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

## Member Function Documentation

### Key::Key()

Constructs an empty Key object.

### `[noexcept]` Key::~Key()

Destroys the key.

### `[noexcept]` bool Key::isValid() const

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