Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Cache problem when preview picture use QAbstractItemDelegate in QListWidget.
i write a delegate to preview the picture in the QListWidget, but there are lots of pictures, and there should be a cache method to Only load and show the Items in the current viewRect.
how can i get the items in the current viewport?
and now i use QPixmap, is there any way to cache it? i know when construct it use: QPixmap ppp(strFilePath), it will be loaded and the file is read...so is there any way to use it in order to work with the Cache mechanism?
QPixmapCache and visualItemRect comes to mind for that
thank you, is it right to use QPixmap to open the image file in order to preview the images?
i found when there are lots of image files, it's very slow to load.
is there any good way to accelerate this?
or may i load there QListWidgetItems one by one, which will make the user feel a little better...
You can create downscaled thumbnails of the images and load them rather than the original
u mean i manually downscale the original image to another image file whose resolution is smaller.
Yes, that's it
@SGaist You can create downscaled thumbnails of the images and load them rather than the original
is there any way to use Qt to downscale various kind formats of pictures?