PDA

View Full Version : Associating icon with a file type



munna
6th June 2006, 11:53
Hi,

I have set icon for the exe and it works.

But...

Is there a Qt way by which I can associate an icon or an image with a particular file type ?

Thanks a lot

wysota
6th June 2006, 12:30
Could you explain? Did you search the forum? There were some questions on associating file types with applications, maybe it's what you want... If not, then maybe you're after QFileIconProvider?

munna
6th June 2006, 12:42
Could you explain?

Sure. For example all the .doc files will have an image associated with them (which is more or less similar to the exe file) when looked in the file explorer. Similarly I want all the files with a particular extension (which my application files will have) to have shown an icon.


Did you search the forum?

Yes. This (http://www.qtcentre.org/forum/showthread.php?t=2149&highlight=associating+file+types) thread talks about how to do it on linux flavors but not on Windows or Mac.

Can someone please tell how to do it on Windows?

Thanks a lot.

nupul
6th June 2006, 17:57
Can someone please tell how to do it on Windows?

Thanks a lot.

The technique is similar in nature to screwing around with the registry....one of your previous threads of opening a .swf file may help...you need to look out for how the registry works...try lookin for this ;)

Nupul