⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

This application failed to start because it could not find or load the Qt platform plugin "windows" in "".

  • So, I just downloaded Qt for the first time, and am attempting to use it to help me build a game engine as a personal project.

    I have Qt 5.6, and I installed it into the folder that I am using for the game engine project. I successfully got the Visual Studio 2015 project to compile without any linker errors, and I can access the includes for Qt, but as soon as I run the project I get that error.

    This application failed to start because it could not find or load the Qt platform plugin "windows" in "".

    Then it says "Reinstalling the application may fix this problem". I first time, I did just that. Reinstalled, re-created the VS2015 project, linked the dlls, libs and includes. And got the same exact error, so reinstalling did not fix the issue. I've searched for hours online to try and find a solution and nothing has worked so far. I can even go into the plugins\platform folder and find the qwindows.dll file. I tried putting copying it into the folder where the VS2015 .exe is. No luck, same error.

    I got frustrated enough trying to fix it that I finally came here to ask the Qt forums directly. Any ideas on how to get this fixed?

    **Edit: **I tried putting the qt.conf file with the edit
    Plugins=<Filepath to the plugins folder>
    Where that plugins folder contained the qwindows.dll file

    This did not work. I also moved the plugins folder directly to the Debug folder where VS2015 is building the .exe, making sure to change the filepath in the .conf folder. No luck there either.

  • Hi, if you create a new simple widgets test project in Qt Creator, can you compile and run it successfully from Qt Creator? I mean, without getting any ".. platform plugin ..." error.

  • Yes. If I go into the Qt Creator, I can build and run a Qt widget application and will get a window with no errors.

  • Well.. It seems that you want to run your application in distributed status.
    The application based on Qt(dynamic-link library) depends on many dlls of Qt, you should enter your executable's folder in a command prompt, and run windeployqt.exe to copy all the neccessary files into your executable's folder to complete the distribution. You should notice that the 'windeployqt.exe' is located at '<Qt_Install_Dir>/5.6.0/5.6/<your_compiler_arch>/bin'.

  • I will try this, though I am a bit confused by your instructions on how to do this.

    Your instructions are to run ..\windeployqt.exe from its qt install directory, and specify that the folder it is to be run in is the Debug folder of my visual studio project, where the .exe for the project is built? I assume using the syntax windeployqt.exe --dir <..\Debug>?

    Edit: The syntax of that command was incorrect, but doing it without the < > produced no result. I'm not very comfortable with using the command prompt. Prove your technical prowess by helping this noob out with the correct command.

  • Lifetime Qt Champion

    Im not really sure if you try to deploy a app. if yes then
    @hskoglund has the best list ever

    For the dlls and sub folders you need.

  • @mrjj Hi. Thank you for the link.

    However there are several problems I've found, likely only due to having version 5.6 of Qt. There is no such .exe named HelloQt.exe in the bin folder of the Qt installation.

    Regardless of that fact, adding in the files specified by the link you provided resolved the error, and now running the VS2015 build produces a window as it should. Consider this problem solved.

Log in to reply