I make Windows application. When I run it on my local computer with QT installation - everything is OK.
But when I run it on another W10 PC or W28R2 server, I get known error.
This application failed to start because it could not find or load the
Qt platform plugin "Windows" Available platform plugins are: "windows"
By default Qt looks for its plugins in the application directory, but you must keep the plugin subdirectories as well.
In your case just copy
myapp\platforms dir so your app can find the plugin.
Better yet, use the windeployqt.exe app bundled with your Qt installation and it will copy all the required Qt libraries and plugins.
For example i use the following as part of my deployment script:
windeployqt.exe myapp.exe --dir myapp_deps
This will copy all the required Qt libraries, plugins and VC++ redistributables (if you have VCINSTALLDIR/VSINSTALLDIR env correctly configured) to the myapp_deps directory. (Note: if you omit the
--dir argument then the command will copy all the dependencies to the current directory where myapp.exe resides).
After this if you put myapp.exe into myapp_deps and relocate the folder to another PC without Qt installed then myapp.exe will run.