'How to add and compile my QT application in Yocto image (which contains QT-5 layer.)?

I am trying to add a qt widgets application/project to my yocto image and compile it through it. I know that I have to add a custom layer and make a recipe which has reference to the files of the qt application. I have also inherited qmake5 and inserted DEPENDS += "qtbase", but I am confused about which files to refer through SRC_UI in my recipe. The QT application file is a bare bone project called "hi" which contains no additional code and pops up a plain helloworld window. The project file contains following files:

    main.cpp 
    hi.pro 
    hi.pro.user
    mainwindow.cpp 
    mainwindow.h 
    ui_mainwindow.h

A reference recipe using above mentioned files would be really helpful.Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source