IDI_ICON1 ICON DISCARDABLE "resource/app.ico"
QList<QPixmap> getExtractIcon(QString fileName){ uint t = (uint)(ExtractIcon(GetModuleHandle(0) , LPCWSTR(fileName.toStdWString().c_str()), -1)); QList<QPixmap> listOut; for (int i = 0; i < t; i++) { HICON tmpIcon = ExtractIcon(GetModuleHandle(0) , LPCWSTR(fileName.toStdWString().c_str()),i); listOut.append(QPixmap::fromWinHICON(tmpIcon)); DestroyIcon (tmpIcon); } return listOut;}
C++ (Qt) QMessageBox aboutBox(this); aboutBox.setWindowTitle(tr("About %1").arg(qApp->applicationName())); aboutBox.setIconPixmap(windowIcon().pixmap(64)); aboutBox.setText(tr("qwerty")); aboutBox.exec();