@Stefan-Monov76
Since I am not using qml I am not sure what requirements there are.
I am working with C++ where you distinguish between source (.cpp) and header (.h included in *.cpp) files. The compiler requires basically only the *.cpp files for compiling. The header files are found through INCLUDEPATH or also other means settings.
Being lazy you could think of just added *.cpp files to your .pro. However, this is a really bad idea, because Qt creator cannot detect that those have changed respectively there might be no dependency on includes in your make.
Sometimes you simply forget an include to add to .pro and I have noticed that those includes are searched.
That it is working for you now, may have something to do with a rerun of qmake. Just wait and see, if teh problem comes back. Eventually for some reason qmake was not triggered.
Note: Since I am not working with qml at all, I am not sure, if you are actually using qmake. Checkout if you actually have "Run qmake" under "Buld" available.