PDA

View Full Version : How to draw thumbnail in treeview?



zl2k
6th November 2008, 16:33
hi, there
I use the treeview to display the dir tree and I want to display a customized thumbnail image along side the name of each folder. The thumbnail is randomly draw from the images contained within the folder. Can someone please give me a hint how to implement that? Thanks ahead.
zl2k

spirit
6th November 2008, 16:53
see this method QDirModel::setIconProvider (http://doc.trolltech.com/4.4/qdirmodel.html#setIconProvider) for more detailes and also QFileIconProvider.

zl2k
6th November 2008, 17:18
see this method QDirModel::setIconProvider (http://doc.trolltech.com/4.4/qdirmodel.html#setIconProvider) for more detailes and also QFileIconProvider.

Thanks for your comment. It works.