Even after changing the environment variable, it still gives me the same error.
However the commands that you suggested do give an executable that works fine. The commands are-
cd HelloWorld
qmake -project
qmake
nmake
But how can I open it in Visual Studio IDE?
Bookmarks