@rpieket
The file names in the PRO file do not match those in your post.
Simple fix so that qmake now finds files.
A Qt test is just another Qt program, following all the same rules. It is just that the Test Lib writes main() for you to allow it to provide a lot of plumbing for you behind the scenes.
If you have the test class declaration in a separate header, as in this case, then that header should be listed in the PRO file HEADERS variable and not in the source file as an #include "blah.moc".
No longer get: make: *** No rule to make target `testqstring.moc', needed by `testqstring.o'. Stop
The QT variable in the PRO file needs QT += testlib so that the test Lib elements are included at compile and link time.
Rerun qmake after changing the PRO file
No longer get: ./Test_with_qmake/main.cpp:2:10: fatal error: 'QTest' file not found
Remaining problems are to do with the construction of the sources and not qmake.
main.cpp needs to #include "qteststring.h" so that the QTEST_MAIN macro expansion, which references TestString, knows what the class looks like.
Test compiles