qtuser-interfaceqt4icons

How to get Qt icon (QIcon) given a file extension


I am developing an application that needs to display icons associated with different file types.
Eg for .doc extensions, i need it to be able to display the Microsoft Word icon.

QUESTION:

How can I somehow get a QIcon from the system using QT sdk

Thanks.


Solution

  • Use the QFileIconProvider class.