I'm currently in the process of porting a large application from Py2/PySide 1.2.4 to Py3/PySide2 5.13.0 and I'm discovering a DeprecationWarning
related to the use of QPixmapCache.find(key, pixmap)
.
c:\path\to\module.py:220: DeprecationWarning: QPixmapCache.find(const QString & key, QPixmap & pixmap) is deprecated
if (QPixmapCache.find("image_key", pixmap) is False):
I would like to fix this deprecation warning, but the documentation isn't very helpful as it:
- Actually at one place explicitly recommends the use of the deprecated function. (
PySide2.QtGui.QPixmapCache.find(key)
) - Has two entries for
static PySide2.QtGui.QPixmapCache.find(key, pixmap)
- One is listed as deprecated.
- The other is not.
- Seems to have no advice on what the modern usage would be. (Or I didn't find it).
So, what is the recommended fix for the deprecated usage of PySide2.QtGui.QPixmapCache.find(key, pixmap)
?