PythonQt.QtGui.QPixmapCache · declarations 001
Back to PythonQt.QtGui.QPixmapCache
Key
instance-attribute
Key: type
PythonQtInstanceWrapper object
cacheLimit
cacheLimit() -> int
X.cacheLimit() -> int
Supplemental documentation: Qt 5 reference:
[static] int QPixmapCache::cacheLimit()
Returns the cache limit (in kilobytes).
The default cache limit is 10240 KB.
See also setCacheLimit().
Upstream PySide2 reference signatures (binding differences may apply):
cacheLimit() -> int
Source: https://doc.qt.io/archives/qt-5.15/qpixmapcache.html#cacheLimit
clear
clear() -> None
X.clear()
Supplemental documentation: Qt 5 reference:
[static] void QPixmapCache::clear()
Removes all pixmaps from the cache.
Upstream PySide2 reference signatures (binding differences may apply):
clear() -> None
Source: https://doc.qt.io/archives/qt-5.15/qpixmapcache.html#clear
find
find(key: Any, pixmap: Any) -> bool
X.find(key, pixmap) -> bool
Supplemental documentation: Qt 5 reference:
[static] bool QPixmapCache::find(const QString \&key, QPixmap *pixmap)
Looks for a cached pixmap associated with the given key in the cache. If the pixmap is
found, the function sets pixmap to that pixmap and returns true; otherwise it leaves
pixmap alone and returns false.
Example:
QPixmap pm;
if (!QPixmapCache::find("my_big_image", &pm)) {
pm.load("bigimage.png");
QPixmapCache::insert("my_big_image", pm);
}
painter->drawPixmap(0, 0, pm);
This function was introduced in Qt 4.6.
[static] bool QPixmapCache::find(const QPixmapCache::Key \&key, QPixmap *pixmap)
Looks for a cached pixmap associated with the given key in the cache. If the pixmap is
found, the function sets pixmap to that pixmap and returns true; otherwise it leaves
pixmap alone and returns false. If the pixmap is not found, it means that the key
is no longer valid, so it will be released for the next insertion.
This function was introduced in Qt 4.6.
Upstream PySide2 reference signatures (binding differences may apply):
find(key: PySide2.QtGui.QPixmapCache.Key, pixmap: PySide2.QtGui.QPixmap) -> bool
find(key: str) -> PySide2.QtGui.QPixmap
find(key: str, pixmap: PySide2.QtGui.QPixmap) -> bool
find(self, arg__1: PySide2.QtGui.QPixmapCache.Key) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpixmapcache.html#find
insert
insert(key: Any, pixmap: Any) -> Any
X.insert(key, pixmap) -> PythonQt.QtGui.QPixmapCache::Key
Supplemental documentation: Qt 5 reference:
[static] bool QPixmapCache::insert(const QString \&key, const QPixmap \&pixmap)
Inserts a copy of the pixmap pixmap associated with the key into the cache.
All pixmaps inserted by the Qt library have a key starting with "$qt", so your own pixmap keys should never begin "$qt".
When a pixmap is inserted and the cache is about to exceed its limit, it removes pixmaps until there is enough room for the pixmap to be inserted.
The oldest pixmaps (least recently accessed in the cache) are deleted when more space is needed.
The function returns true if the object was inserted into the cache; otherwise it
returns false.
See also setCacheLimit().
[static] QPixmapCache::Key QPixmapCache::insert(const QPixmap \&pixmap)
Inserts a copy of the given pixmap into the cache and returns a key that can be used to retrieve it.
When a pixmap is inserted and the cache is about to exceed its limit, it removes pixmaps until there is enough room for the pixmap to be inserted.
The oldest pixmaps (least recently accessed in the cache) are deleted when more space is needed.
This function was introduced in Qt 4.6.
See also setCacheLimit() and replace().
Upstream PySide2 reference signatures (binding differences may apply):
insert(key: str, pixmap: PySide2.QtGui.QPixmap) -> bool
insert(pixmap: PySide2.QtGui.QPixmap) -> PySide2.QtGui.QPixmapCache.Key
Source: https://doc.qt.io/archives/qt-5.15/qpixmapcache.html#insert
remove
remove(key: Any) -> None
X.remove(key)
Supplemental documentation: Qt 5 reference:
[static] void QPixmapCache::remove(const QString \&key)
Removes the pixmap associated with key from the cache.
[static] void QPixmapCache::remove(const QPixmapCache::Key \&key)
Removes the pixmap associated with key from the cache and releases the key for a future insertion.
This function was introduced in Qt 4.6.
Upstream PySide2 reference signatures (binding differences may apply):
remove(key: PySide2.QtGui.QPixmapCache.Key) -> None
remove(key: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpixmapcache.html#remove
replace
replace(key: Any, pixmap: Any) -> bool
X.replace(key, pixmap) -> bool
Supplemental documentation: Qt 5 reference:
[static] bool QPixmapCache::replace(const QPixmapCache::Key \&key, const QPixmap \&pixmap)
Replaces the pixmap associated with the given key with the pixmap specified. Returns
true if the pixmap has been correctly inserted into the cache; otherwise returns
false.
This function was introduced in Qt 4.6.
See also setCacheLimit() and insert().
Upstream PySide2 reference signatures (binding differences may apply):
replace(key: PySide2.QtGui.QPixmapCache.Key, pixmap: PySide2.QtGui.QPixmap) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qpixmapcache.html#replace
setCacheLimit
setCacheLimit(arg__1: int) -> None
X.setCacheLimit(arg__1)
Supplemental documentation: Qt 5 reference:
[static] void QPixmapCache::setCacheLimit(int n)
Sets the cache limit to n kilobytes.
The default setting is 10240 KB.
See also cacheLimit().
Upstream PySide2 reference signatures (binding differences may apply):
setCacheLimit(arg__1: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpixmapcache.html#setCacheLimit