PDA

View Full Version : Getting mulitiple size file icons with QFileIconProvider



gmat4321
18th March 2009, 13:36
Does anyone know how to get multiple size icons with the QFileIconProvider?

I am iterating through a directory getting the file list and icons. I want to be able to show the file icon at different sizes. On Windows Vista you have very large icons (256,256), these are PNG format. My understanding is that icons can have muiltiple sizes defined within icon the file.

When I use the QFileIconProvider the largest icon size I get is 32 x 32. I assume I only get this one size. How would I get the larger icons? And how can I iterate through the icon to know what sizes I have available to display?

wysota
19th March 2009, 14:41
I'd say you have to provide your own icon provider object that would return QIcon objects with multiple pixmaps.