Olivier Roulet wrote:
pyqt3.4 and python2.2.1 qt3.01 , linux
I am using QIconView in a small program to display
thumbnails of all pictures in a directory.
Since it takes quite long to generate the thumbnails
I first create the IconView and then I use
a queue in a different thread to post events to
create the thumbnails one by one
I implemented a very similar application in a slightly different way:

On the main Qt thread (i.e. in response to a Qt event) I create all the QListViewItem objects for all the images with a placeholder icon (a big question mark)

Then on a separate thread, I then go through the files, load the image, create the thumbnail (or load from cache) and update the QListViewItem's icon with the new image. All with the appropriate QApplication.lock and unlock calls.

It took me a few tries before I got it to work without randomly segfaulting ;)

Ciao,
Gordon

_______________________________________________
PyKDE mailing list [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Reply via email to