Hi all
Can anybody know is there any class or function in Qt through which, It recognises the file type and sets icon of the file to the respective file type.
for eg. If there is a PNG file , then it set icon of the PNG file, in front of that file.
Hi all
Can anybody know is there any class or function in Qt through which, It recognises the file type and sets icon of the file to the respective file type.
for eg. If there is a PNG file , then it set icon of the PNG file, in front of that file.
Always Believe in Urself![]()
Merry
You need to implement your own QFileIconProvider.
merry (2nd June 2008)
Thanx 4 the reply
Actually i am having a TreeWidget of Files and folders.
And these required every time 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 ,Music.mp3, Movie.avi then it should automatically show the Icon of the particular file.
Is it possible to do?
Always Believe in Urself![]()
Merry
Still you need to create an appropriate file icon provider and query it for icons. Of course you can also do that manually by checking filename suffixes and creating icons yourself.
Bookmarks