Key#

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

Synopsis#

Functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

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

class PySide6.QtGui.QPixmapCache.Key#

PySide6.QtGui.QPixmapCache.Key(other)

Parameters:

otherPySide6.QtGui.QPixmapCache.Key

Constructs an empty Key object.

PySide6.QtGui.QPixmapCache.Key.isValid()#
Return type:

bool

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

PySide6.QtGui.QPixmapCache.Key.__ne__(key)#
Parameters:

keyPySide6.QtGui.QPixmapCache.Key

Return type:

bool

PySide6.QtGui.QPixmapCache.Key.__eq__(key)#
Parameters:

keyPySide6.QtGui.QPixmapCache.Key

Return type:

bool

PySide6.QtGui.QPixmapCache.Key.swap(other)#
Parameters:

otherPySide6.QtGui.QPixmapCache.Key