Converting from QPixmap to QImage while traversing file trees and loading data is fairly slow.
I had to write an asset browser with a preview ability a couple of years ago and what I did was using a QItemDelegate, drawing the asset's content via QPainter but only for items currently visible in the view. Additionally I implemented a lazy loading for the item data which all in all resulted in a list view being capable of handling tens of thousands of items with smooth scrolling.
This might be the hard way and way more work than using the item's icon but this way we never had performance issues anymore.




Reply With Quote

Bookmarks