Key 类

( QPixmapCache::Key )

The QPixmapCache::Key 类可以用于有效访问 QPixmapCache . 更多...

头: #include <Key>
qmake: QT += gui
Since: Qt 4.6

公共函数

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

详细描述

The QPixmapCache::Key 类可以用于有效访问 QPixmapCache .

使用 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 对象。

Key:: ~Key ()

销毁 Key。

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.

该函数在 Qt 5.7 引入。