Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 433
Dr Deo Avatar asked Jan 06 '11 17:01

Dr Deo


1 Answers

Use the QtGui.QFileIconProvider class.

like image 133
lunaryorn Avatar answered Oct 13 '22 00:10

lunaryorn