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. Could not find the Qt platform plugin "windows"

Could not find the Qt platform plugin "windows"

Scheduled Pinned Locked Moved Solved General and Desktop
24 Posts 5 Posters 7.0k 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.
  • D Offline
    D Offline
    Deathcomes
    wrote on last edited by
    #1

    I have a problem. When i'm trying to run a project through Qt i get this error:

    qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    

    Also it shows this window
    ea199cd0-9de6-40f5-b1e5-86619f39f3a7-image.png

    Also note that the project compiles successfully.

    JonBJ 1 Reply Last reply
    0
    • D Deathcomes

      I have a problem. When i'm trying to run a project through Qt i get this error:

      qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
      

      Also it shows this window
      ea199cd0-9de6-40f5-b1e5-86619f39f3a7-image.png

      Also note that the project compiles successfully.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Deathcomes
      Set environment variable QT_DEBUG_PLUGINS=1, either from command line and then invoke your executable, or from within Creator's run-time environment variables and run app from within Creator. Look at the output you will get, to see where the problem originates.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Deathcomes
        wrote on last edited by Deathcomes
        #3

        It prints this

        QFactoryLoader::QFactoryLoader() checking directory path "MY_PROJECT_PATH/release/platforms" ...
        

        Is there a way to change this? It should by default be "C:\Qt\5.12.1\mingw73_64\plugins" right?

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

          Hi,

          Are you trying to run your application outside Qt Creator ? If so, did you proceed with the deployment procedure ?

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

          D 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Are you trying to run your application outside Qt Creator ? If so, did you proceed with the deployment procedure ?

            D Offline
            D Offline
            Deathcomes
            wrote on last edited by
            #5

            @SGaist No inside.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              Deathcomes
              wrote on last edited by
              #6

              Any ideas? If you want more details tell me.

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

                Please show some patience and allow at least 24 hours before bumping your own thread. This is a voluntary driven forum and people answering here might not live in the same time zone as you.

                Start your application with the QT_DEBUG_PLUGINS environment variable set to 1. It will log what happens with the plugin.

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

                D 1 Reply Last reply
                0
                • SGaistS SGaist

                  Please show some patience and allow at least 24 hours before bumping your own thread. This is a voluntary driven forum and people answering here might not live in the same time zone as you.

                  Start your application with the QT_DEBUG_PLUGINS environment variable set to 1. It will log what happens with the plugin.

                  D Offline
                  D Offline
                  Deathcomes
                  wrote on last edited by
                  #8

                  @SGaist Thank you! Already done that!

                  @Deathcomes said in Could not find the Qt platform plugin "windows":

                  It prints this

                  QFactoryLoader::QFactoryLoader() checking directory path "MY_PROJECT_PATH/release/platforms" ...
                  

                  Is there a way to change this? It should by default be "C:\Qt\5.12.1\mingw73_64\plugins" right?

                  Is there a way to config this path? It should already be fine (tried it on other projects and it works ok (only difference is qt version)) but it seems not.

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Bonnie
                    wrote on last edited by
                    #9

                    Have you put any other file to "MY_PROJECT_PATH/release" folder?
                    What if you completely delete that folder and try again?

                    1 Reply Last reply
                    1
                    • D Offline
                      D Offline
                      Deathcomes
                      wrote on last edited by
                      #10

                      @Bonnie I always leave that folder as it so that i don't "break" something. I will check it although!

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        Deathcomes
                        wrote on last edited by
                        #11

                        @Bonnie I checked it and the same thing happens.

                        1 Reply Last reply
                        0
                        • hskoglundH Offline
                          hskoglundH Offline
                          hskoglund
                          wrote on last edited by
                          #12

                          Hi, if you try run another Qt project from inside Qt Creator, like one of Qt's examples, do you get the same error?

                          D 1 Reply Last reply
                          1
                          • hskoglundH hskoglund

                            Hi, if you try run another Qt project from inside Qt Creator, like one of Qt's examples, do you get the same error?

                            D Offline
                            D Offline
                            Deathcomes
                            wrote on last edited by Deathcomes
                            #13

                            @hskoglund Theoretically no because i have another project (although with Qt5.2.1) which compiles and runs (from inside Qt) perfectly.
                            Should i try to test with a new project with 5.12.1?

                            1 Reply Last reply
                            0
                            • hskoglundH Offline
                              hskoglundH Offline
                              hskoglund
                              wrote on last edited by
                              #14

                              Yes, try an example project with 5.12.1.

                              D 1 Reply Last reply
                              0
                              • hskoglundH hskoglund

                                Yes, try an example project with 5.12.1.

                                D Offline
                                D Offline
                                Deathcomes
                                wrote on last edited by
                                #15

                                @hskoglund Same thing happens with a new one.

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

                                  Do you have other versions of Qt installed on your system ? For example by other applications ?

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

                                  D 1 Reply Last reply
                                  1
                                  • SGaistS SGaist

                                    Do you have other versions of Qt installed on your system ? For example by other applications ?

                                    D Offline
                                    D Offline
                                    Deathcomes
                                    wrote on last edited by Deathcomes
                                    #17

                                    @SGaist Yes Qt 5.2.1 because i also maintain an older project.

                                    These are my versions settings:

                                    f2c3b887-8456-4b81-af93-59bc08422f13-image.png

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

                                      I meant: check your system for other Qt version that may have been installed along any of your applications.

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

                                      D 2 Replies Last reply
                                      0
                                      • SGaistS SGaist

                                        I meant: check your system for other Qt version that may have been installed along any of your applications.

                                        D Offline
                                        D Offline
                                        Deathcomes
                                        wrote on last edited by
                                        #19

                                        @SGaist Ow! Sorry! How do i check that?

                                        1 Reply Last reply
                                        0
                                        • SGaistS SGaist

                                          I meant: check your system for other Qt version that may have been installed along any of your applications.

                                          D Offline
                                          D Offline
                                          Deathcomes
                                          wrote on last edited by Deathcomes
                                          #20

                                          @SGaist I searched but i didn't find any.

                                          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