Sorry I mean when I run the program is says
TestRect is not a type
It compiles fine. both main.qml and TestRect.qml are in the same folder:

Projectfolder\
------------project.qrc
------------main.cpp
------------*.cpp
------------*.h
------------images\
------------qml \
-----------------main.qml
-----------------TestRect.qml

Thanks in advance