Hi all,

I'm using QPixmapCache to store some icons (png), icons are then used to display proper pixmap for subclassed QGraphicsPixmapItem.
QPixmapCache is filled once during application start, then each time when I create new QGraphicsPixmapItem, inside constructor of that item I'm doing:
Qt Code:
  1. if(!QPixmapCache::find(QString::fromUtf8("icon_%1_state_1").arg(button_type),&pixStandard))
  2. qWarning()<<"ButtonsPixmapItem::ButtonsPixmapItem no pixmap for icon_1_state_1";
  3. if(!QPixmapCache::find(QString::fromUtf8("icon_%1_state2").arg(button_type),&pixShortPress))
  4. qWarning()<<"ButtonsPixmapItem::ButtonsPixmapItem no pixmap for icon_1_state2";
  5. if(!QPixmapCache::find(QString::fromUtf8("icon_%1_state3").arg(button_type),&pixLongPress))
  6. qWarning()<<"ButtonsPixmapItem::ButtonsPixmapItem no pixmap for icon_1_state3";
  7. if(!QPixmapCache::find(QString::fromUtf8("icon_%1_state4").arg(button_type),&pixDisabled))
  8. qWarning()<<"ButtonsPixmapItem::ButtonsPixmapItem no pixmap for icon_1_state4";
To copy to clipboard, switch view to plain text mode 

After some time, when I'm deleting and creating 20 or 40 QGraphicsPixmapItems, QPixmapCache seems to remove image from the cache, next time I want to find item in cache, I got "false" from QPixmapCache::find and this message.
Is that possible that under some conditions QPixmapCache removes data? Can this be caused by deleted QGraphicsPixmapItems that used this pixmap, found earlier by QPixmapCache::find ?
I'm using Qt 4.8.1 on Linux

best regards
Marek