Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. This application failed to start because it could not find or load the qt platform plugin "windows".
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 7 Posters 25.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    small_bird
    wrote on 7 Sept 2017, 01:58 last edited by
    #1

    Hi everyone,

    I'm actually working on QT5.9 and have this error :
    this application failed to start because it could not find or load the qt platform plugin "windows"
    in "".

    I tried all the answer i could find on other forums but none worked

    The thing is, when i launch the .exe from the computer that generated it, it's working but if i change computer i have this error... Can someone help me for this i cant find a relevant solution.

    I already tried to include platforms\qwindows.dll in my .exe location

    Thanks for reading this topic.

    S L 2 Replies Last reply 7 Sept 2017, 04:02
    0
    • S small_bird
      7 Sept 2017, 01:58

      Hi everyone,

      I'm actually working on QT5.9 and have this error :
      this application failed to start because it could not find or load the qt platform plugin "windows"
      in "".

      I tried all the answer i could find on other forums but none worked

      The thing is, when i launch the .exe from the computer that generated it, it's working but if i change computer i have this error... Can someone help me for this i cant find a relevant solution.

      I already tried to include platforms\qwindows.dll in my .exe location

      Thanks for reading this topic.

      S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 7 Sept 2017, 04:02 last edited by
      #2

      @small_bird said in This application failed to start because it could not find or load the qt platform plugin "windows".:

      I already tried to include platforms\qwindows.dll in my .exe location

      That's a good first step, but please follow the whole deployment procedure.

      (Z(:^

      1 Reply Last reply
      3
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 7 Sept 2017, 07:01 last edited by
        #3

        Hi
        This is also good info (IMHO)
        http://www.tripleboot.org/?p=138

        1 Reply Last reply
        2
        • S small_bird
          7 Sept 2017, 01:58

          Hi everyone,

          I'm actually working on QT5.9 and have this error :
          this application failed to start because it could not find or load the qt platform plugin "windows"
          in "".

          I tried all the answer i could find on other forums but none worked

          The thing is, when i launch the .exe from the computer that generated it, it's working but if i change computer i have this error... Can someone help me for this i cant find a relevant solution.

          I already tried to include platforms\qwindows.dll in my .exe location

          Thanks for reading this topic.

          L Offline
          L Offline
          laserdyne.rd
          wrote on 19 Sept 2017, 02:29 last edited by laserdyne.rd
          #4

          This was a big problem for us. In the end it was easy to fix but took several hours, and really should not have, if the error output had been more detailed.

          Background: The previous apps were built using QT5.1. Only after QT5.8 did things change / break. Win10Pro-64 machine.

          What I found:

          • Qt5Core.dll was previously referring to an absolute path on my machine, for dependencies, namely plugins\platforms\qwindows.dll . This worked on mine and another Qt dev colleague's machines because we had Qt5.8 installed with default locations (same absolute path). On other machines the "this application failed to start because it could not find or load the qt platform plugin "windows"
            in ""." message would show up.
          • Modifying Qt5Core.dll to remove the absolute path (using windeploy) made the dependencies path . (relative/current path). Doing this broke the apps running on my dev machine.
          • The reason it broke is that Qt5Core.dll was looking for qwindows.dll in .\plugins\platforms instead of .\platforms like the previous Qt5.1 apps were. Therefore the fix was to move .\platforms into .\plugins and move the updated qwindows.dll file from the Qt5.8 install dir into it (in my case, C:\Qt\Qt5.8.0\5.8\mingw53_32\plugins\platforms)

          Nothing like a message box with mostly useless content to help find where the problem is. Perhaps there is room for improvement there, Qt devs?

          J S 2 Replies Last reply 19 Sept 2017, 04:23
          0
          • L laserdyne.rd
            19 Sept 2017, 02:29

            This was a big problem for us. In the end it was easy to fix but took several hours, and really should not have, if the error output had been more detailed.

            Background: The previous apps were built using QT5.1. Only after QT5.8 did things change / break. Win10Pro-64 machine.

            What I found:

            • Qt5Core.dll was previously referring to an absolute path on my machine, for dependencies, namely plugins\platforms\qwindows.dll . This worked on mine and another Qt dev colleague's machines because we had Qt5.8 installed with default locations (same absolute path). On other machines the "this application failed to start because it could not find or load the qt platform plugin "windows"
              in ""." message would show up.
            • Modifying Qt5Core.dll to remove the absolute path (using windeploy) made the dependencies path . (relative/current path). Doing this broke the apps running on my dev machine.
            • The reason it broke is that Qt5Core.dll was looking for qwindows.dll in .\plugins\platforms instead of .\platforms like the previous Qt5.1 apps were. Therefore the fix was to move .\platforms into .\plugins and move the updated qwindows.dll file from the Qt5.8 install dir into it (in my case, C:\Qt\Qt5.8.0\5.8\mingw53_32\plugins\platforms)

            Nothing like a message box with mostly useless content to help find where the problem is. Perhaps there is room for improvement there, Qt devs?

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 19 Sept 2017, 04:23 last edited by
            #5

            @laserdyne.rd If you want to ask Qt devs you shouldn't do it here as this is Qt users forum.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • L laserdyne.rd
              19 Sept 2017, 02:29

              This was a big problem for us. In the end it was easy to fix but took several hours, and really should not have, if the error output had been more detailed.

              Background: The previous apps were built using QT5.1. Only after QT5.8 did things change / break. Win10Pro-64 machine.

              What I found:

              • Qt5Core.dll was previously referring to an absolute path on my machine, for dependencies, namely plugins\platforms\qwindows.dll . This worked on mine and another Qt dev colleague's machines because we had Qt5.8 installed with default locations (same absolute path). On other machines the "this application failed to start because it could not find or load the qt platform plugin "windows"
                in ""." message would show up.
              • Modifying Qt5Core.dll to remove the absolute path (using windeploy) made the dependencies path . (relative/current path). Doing this broke the apps running on my dev machine.
              • The reason it broke is that Qt5Core.dll was looking for qwindows.dll in .\plugins\platforms instead of .\platforms like the previous Qt5.1 apps were. Therefore the fix was to move .\platforms into .\plugins and move the updated qwindows.dll file from the Qt5.8 install dir into it (in my case, C:\Qt\Qt5.8.0\5.8\mingw53_32\plugins\platforms)

              Nothing like a message box with mostly useless content to help find where the problem is. Perhaps there is room for improvement there, Qt devs?

              S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 19 Sept 2017, 05:02 last edited by
              #6

              @laserdyne.rd it's all in the docs, the whole deployment process is described, and all the many ways in which it can/ should be done. Following that will not break your dev installation, and it will work for users who have no Qt installed, too.

              Yeah, though, I definitely agree the error message could be more informative - feel free to open a suggestion on Qt bugtracker or mailing list.

              I've also just noticed the deployment guide is slightly outdated (still mentions Angle as default config option on Windows, which is not true anymore).

              (Z(:^

              1 Reply Last reply
              2
              • W Offline
                W Offline
                Wayne H. Hamberg
                wrote on 28 Jun 2018, 20:20 last edited by
                #7

                This is a problem that we are experiencing and the problem is quite frustrating. I should be able to through the environment setup process determine which version of the QT library I wish to use like you can do with Visual Studio (.Net 2.0 ... .Net 4.7.) There should also be an addin that would build a deployable application with all of the needed .DLLs without having to spend ANY TIME trying to figure out what you might need. What would be wonderful is if QT had an install feature that would properly install and configure NetBeans,<your language of choice> and QT with a simple single package.

                J 1 Reply Last reply 29 Jun 2018, 05:15
                0
                • W Wayne H. Hamberg
                  28 Jun 2018, 20:20

                  This is a problem that we are experiencing and the problem is quite frustrating. I should be able to through the environment setup process determine which version of the QT library I wish to use like you can do with Visual Studio (.Net 2.0 ... .Net 4.7.) There should also be an addin that would build a deployable application with all of the needed .DLLs without having to spend ANY TIME trying to figure out what you might need. What would be wonderful is if QT had an install feature that would properly install and configure NetBeans,<your language of choice> and QT with a simple single package.

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 29 Jun 2018, 05:15 last edited by
                  #8

                  @Wayne-H.-Hamberg You can tell QtCreator which Qt version to use by selecting the Kit for this version.
                  Why should Qt(!) provide an installer for NetBeans? You should rather ask NetBeans project for better Qt integration.
                  For deployment of Qt application there is already support: http://doc.qt.io/qt-5/deployment.html
                  But I agree that it could be further simplified.
                  This forum is not the right place to ask for features. You should file a change request on Qt bugtracker.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  3
                  • P Offline
                    P Offline
                    PythonQTMarlem
                    wrote on 18 Jul 2020, 18:25 last edited by
                    #9

                    I have the same problem.
                    Windows 10, Dos-Command:
                    pip install cx_freeze

                    My Setup-File:

                    from cx_Freeze import setup, Executable
                    
                    setup(name = "PQTTexteditor" ,
                          version = "1.0" ,
                          description = "Barrierefreier Texteditor" ,
                    	  author='Markus Lemcke',
                          author_email='info@marlem-software.de',
                          url='https://www.marlem-software.de',
                          executables = [Executable("PQTTexteditor.py")])
                    

                    Build exe-File:
                    python setupwin.py build

                    Try to start Programm:
                    PQTTexteditor.exe

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

                    Reinstalling the application may fix this problem.

                    Question:
                    What can I do?

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved