C++ (Qt)#include <QApplication>#include <QFileInfo>#include <QFileIconProvider>#include <QLabel>//int main(int argc, char *argv[]) { QApplication app(argc, argv); QFileIconProvider provider; QFileInfo notepad("c:/windows/notepad.exe"); QLabel lbl; lbl.setPixmap(provider.icon(notepad).pixmap(32, 32)); lbl.show(); return app.exec();}