The error is caused because the program can't find qwindows.dll
qwindows.dll
has
to be in a folder named platforms
so
that the path from your executable to the dll is platforms/qwindows.dll
Whereas this wasn't enough in my case. I had also to add following line at the beginning of my main()
QCoreApplication::addLibraryPath("./");
Then everything worked.