Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Deployment issue - Could not find or load the Qt Platform plugin "windows"
Forum Updated to NodeBB v4.3 + New Features

Deployment issue - Could not find or load the Qt Platform plugin "windows"

Scheduled Pinned Locked Moved Installation and Deployment
deployment plug
16 Posts 5 Posters 5.6k Views 3 Watching
  • 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.
  • SGaistS SGaist

    Hi and welcome to devnet,

    A good tool to help deployment is windeployqt, it should pull in everything you need

    A Offline
    A Offline
    alex1
    wrote on last edited by
    #3

    @SGaist Hello, and thank you for your response. I tried windeployqt and it did not solve the problem unfortunately.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Did you call it in a clean build of your application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #5

        Hi @alex1,

        Please follow SGaist's suggestion to do a clean build. If that still doesn't work, please tell us the following to help with the diagnosis:

        1. How many versions of Qt do you have installed? What are they?
        2. Did you upgrade Qt recently (after your last successful deployment)?
        3. What is the full path to to folder that you got the DLLs from?
        4. What happens if you revert your code to an old version (before you added QMediaPlayer)? Does it still deploy correctly?

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alex1
          wrote on last edited by
          #6

          I just tried it with a clean build of the application and it did not work.

          1. I have two versions of Qt installed, Qt 5.3.0 and Qt 5.3.2. The build kit for 5.3.0 was used for the app. I tried building/running windeploy after deleting the 5.3.2 folder to make sure 5.3.0 was the only version installed but that didn't fix the problem.
          2. I didn't upgrade recently
          3. C:\Qt\Qt5.3.0\5.3\mingw482_32\bin

          Maybe if I completely uninstall Qt and then install qt 5.3.0?

          JKSHJ 1 Reply Last reply
          0
          • A alex1

            I just tried it with a clean build of the application and it did not work.

            1. I have two versions of Qt installed, Qt 5.3.0 and Qt 5.3.2. The build kit for 5.3.0 was used for the app. I tried building/running windeploy after deleting the 5.3.2 folder to make sure 5.3.0 was the only version installed but that didn't fix the problem.
            2. I didn't upgrade recently
            3. C:\Qt\Qt5.3.0\5.3\mingw482_32\bin

            Maybe if I completely uninstall Qt and then install qt 5.3.0?

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #7

            @alex1 said:

            Maybe if I completely uninstall Qt and then install qt 5.3.0?

            It's worth trying. From your answers, I can't really see what's causing the problems.

            Does your app run correctly if you launch it from Qt Creator? If so, you can use ListDLLs to see exactly which DLLs your app has loaded.

            By the way, Qt 5.3.2 is a bugfix + stability release, designed to completely replace Qt 5.3.0. May I ask why you want to use Qt 5.3.0 instead of 5.3.2?

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            0
            • A Offline
              A Offline
              alex1
              wrote on last edited by alex1
              #8

              OK, I removed all Qt installations from my computer and qt creator and installed Qt 5.5.0 mingw 32 bit. I removed the QMediaPlayer stuff and then used windeploy.exe on a clean build it worked fine. Then I added the QMediaPlayer stuff and same result with the windows platform plugin error. Since I'm able to run it in the debugger in release mode, I ran ListDLLs on it and checked to make sure every dll that is uses that is not in any windows system folder is present in the deployment folder, but that still didn't fix the problem. Not sure what to do next, any other ideas?

              update: I can run it from the deployment folder, but if I rename C:\Qt to C:\QtHidden it will crash with the windows platform error. Heres a screenshot of the deployment folder: http://i.imgur.com/pyOwpZl.png The folder was built with windeploy.exe

              update: I found a solution. If I add QT_PLUGIN_PATH to system environment variables and set it to "." then it works. I'd prefer not to use this solution.

              A 1 Reply Last reply
              0
              • A alex1

                OK, I removed all Qt installations from my computer and qt creator and installed Qt 5.5.0 mingw 32 bit. I removed the QMediaPlayer stuff and then used windeploy.exe on a clean build it worked fine. Then I added the QMediaPlayer stuff and same result with the windows platform plugin error. Since I'm able to run it in the debugger in release mode, I ran ListDLLs on it and checked to make sure every dll that is uses that is not in any windows system folder is present in the deployment folder, but that still didn't fix the problem. Not sure what to do next, any other ideas?

                update: I can run it from the deployment folder, but if I rename C:\Qt to C:\QtHidden it will crash with the windows platform error. Heres a screenshot of the deployment folder: http://i.imgur.com/pyOwpZl.png The folder was built with windeploy.exe

                update: I found a solution. If I add QT_PLUGIN_PATH to system environment variables and set it to "." then it works. I'd prefer not to use this solution.

                A Offline
                A Offline
                alex1
                wrote on last edited by
                #9
                This post is deleted!
                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  You can use a qt.conf file for that in your application folder however that doesn't explain why when using a multimedia widget your application fails.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by SGaist
                    #11

                    Aren't you missing the QtMultimediaWidgets library ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    A 1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      NetZwerg
                      wrote on last edited by NetZwerg
                      #12

                      Are you supplying the qwindows.dll from $QTDIR/plugins/platforms?

                      Path has to be:
                      YourApplication.exe
                      platforms/qwindows.dll

                      There was a bug in some early 5.x versions if i recall correctly, which was looking for the dll in the $QTDIR-path instead of local deployment. https://bugreports.qt.io/browse/QTBUG-46697?jql=text ~ "qwindows.dll"

                      Edit: I should definitly do not jump to the end of the discussion if most things have been answered....

                      A 1 Reply Last reply
                      0
                      • N NetZwerg

                        Are you supplying the qwindows.dll from $QTDIR/plugins/platforms?

                        Path has to be:
                        YourApplication.exe
                        platforms/qwindows.dll

                        There was a bug in some early 5.x versions if i recall correctly, which was looking for the dll in the $QTDIR-path instead of local deployment. https://bugreports.qt.io/browse/QTBUG-46697?jql=text ~ "qwindows.dll"

                        Edit: I should definitly do not jump to the end of the discussion if most things have been answered....

                        A Offline
                        A Offline
                        alex1
                        wrote on last edited by
                        #13

                        @NetZwerg
                        I am supplying the qwindows.dll from $QTDIR/plugins/platforms
                        It must be the Qt bug because I have the deployment folder structure correct. If I set the plugins path using QT_PLUGIN_PATH = . then it works. It must be still trying to look for the qwindows.dll in the Qt install folder. So far the only solution I have is to set QT_PLUGIN_PATH. I tried qt.conf in the working directory and it didn't work. I put this in qt.conf:

                        [Paths]
                        Plugins = .

                        1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Aren't you missing the QtMultimediaWidgets library ?

                          A Offline
                          A Offline
                          alex1
                          wrote on last edited by
                          #14

                          @SGaist I ran windeploy.exe after installing qt 5.5.0 and it didn't need QtMultimediaWidgets.dll

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            alex1
                            wrote on last edited by
                            #15

                            I just ended up using the QT_PLUGIN_PATH variable, thanks for the help everyone.

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              S. Carney
                              wrote on last edited by
                              #16

                              You should also define the 'Prefix'. It would be something like 'Prefix = /path/to/the/root/of/your/qt/install'

                              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