A little background... I've built a thumbnail view similar to what is outlined in this post. My previous version of a thumbnail view involved a QFlowLayout, a QScrollArea and a custom thumbnail widget. I also created a thumbnailing service, which is essentially a class with several thumbnail loading threads. Ask the service for a thumbnail, it hands off the job to a thread, emits a signal returning a QImage to the service, which emits a signal with a QPixmap to the requester.

To make it faster and more responsive I've done the following:

  1. Use a QListWidget instead of custom widgets. This is way faster and more responsive. It uses the delayed layout feature of the QListWidget so I can easily resize the icons and maintain some responsiveness
  2. The thumbnail service batches up results from the thumbnail thread and only emits a signal after a timer has gone off, so as to not emit signals too often if the thumbnail loading threads finish in quick succession.


The slow part seems to be when the thumbnail service gets QImages back and it converts them to QPixmaps but its a little hard to tell since this program is difficult to profile.

Anyway, I wanted to share my technique for creating a responsive application and see if anyone has other ideas or techniques to keep the ui interactive while processing.