To add an icon to your qt quick app just follow these 2 easy steps:
open the .qrc file where you have added your static images.
If you don't have a qrc file in your project then do the following.
This is the GUI way.
->Open your project in qt creator.
->Add new qt resources file, then open this file in your editor
->Press add files button and search and select your icon.
->Save the qrc file.
Text Editor Way
->Open your qrc file in your favorite text editor and add the following lines.
<RCC>
<qresource prefix="/">
<file>images/logo.png</file>
</qresource>
</RCC>
Note the qrc file must be added in the CMakeLists.txt file if you are using cmake or .pro file if you are using qmake.
Open your main.cpp
#include <QGuiApplication>
#include <QIcon>
int main(int argc, char** argv) {
QGuiApplication app(argc, argv);
QGuiApplication::setWindowIcon(QIcon(":/images/logo.png"));
// next do whatever is needed.
}