I have started to learn Qt and created .cpp file, as it explained in this tutorial. Then I open a command promt and type next commands:
qmake -project
qmake
make
After first two lines everething is ok, but after third line it gives an error:
Makefile:62: ***multiple target patterns. Stop.
From the comment: I use Windows with mingw. Qt 5.2.1 (MSVC 2010, 32 bit)
That is wrong. You seem to be mixing the MSVC based Qt installation with mingw. You cannot do that. Mingw and MSVC are different compilers. They are not ABI compatible, nor are their makefiles compatible.
That also explains the issue since you will have path issues in the makefile itself as the gnu and windows makefiles are slightly different in that regard.
You should install the mingw version of Qt or build yourself.
On a side note: you seem to be reading a Qt 4 example, whereas you are trying to use Qt 5. In Qt 5, the widgets were put into their own widgets module. That does not get added to the project file automatically, so you will need to add QT+=widgets
manually.
Edit: seems you have misled us, and you do have a mingw version installed. Once that is done, you should execute the following command then:
qmake -r -spec win32-g++
-r
: it will go through the subdirectories, i.e. it will be recursive.
-spec win32-g++
: this will tell qmake to generate GNU makefile.
That being said, you should look into how to set up a kit in QtCreator. It is better than using qmake from the command prompt.