C++ (Qt)QApplication a(argc, argv);a.setWindowIcon(QIcon(QDir::currentPath() + "/icon.ico"));return a.exec();
<!DOCTYPE RCC><RCC version="1.0"><qresource> <file>icon.png</file></qresource></RCC>
RESOURCES += icon.qrc
QIcon(":/icon.png");