PDA

View Full Version : Setting OS Specified Icon on the File?



vishal.chauhan
3rd April 2008, 05:15
Hi All,

I am working on Mac OS and Qt 4.3.4.
I am creating a treeWidget from the Hard Disk and it shows me the file and folder of the selected path.

I want that the treeWidget will show me the actual Icon whcih is used on the mac(that for say mp3 file it should show thw mp3 icon used on mac etc..)

If any body knows then plz help me.

Thanks.

jpn
3rd April 2008, 06:53
I'm not sure if this is the case on Mac but doesn't QDirModel show them out of the box?

vishal.chauhan
3rd April 2008, 07:03
Actually I does not using QDirModel Approach (Although I am not sure it will show the Icon).

and the fact is that I can not change my approach either.

Is there is some setting that is to be used to show Icpon.

jpn
3rd April 2008, 07:06
QDirModel uses QFileIconProvider.

vishal.chauhan
31st May 2008, 12:37
Actually these required the path of the file or folder whose Icon is to be used.
But I want to do like this that suppose If I add some files say

image.jpeg , Image1.gif, Image2.png ,Image4.bmp then it should automatically show the Icon of the perticular file.

Is it possible to do?