[Qt-interest] How to get an icon associated with a certain filetype using Qt?

Nikos Chantziaras realnc at arcor.de
Wed Mar 24 19:10:28 CET 2010


On 03/24/2010 11:45 AM, Oliver.Knoll at comit.ch wrote:
> André Somers wrote on Wednesday, March 24, 2010 8:32 AM:
>
>> ...
>> Perhaps studying the sources of QFileIconProvider will help you get
>> what you want. I just looked, and at least for windows it seems to
>> use the file extension. Do you happen to have the file name too?
>
> And does it really have to be the icon of the application which can deal with that MIME type? Or would "generic" icons be sufficient?

That doesn't work that way.  There's only one icon used, no matter how 
many applications can open the file.  That's true on all platforms.



More information about the Qt-interest-old mailing list