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. qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
Forum Updated to NodeBB v4.3 + New Features

qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 2.3k Views 1 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.
  • M Offline
    M Offline
    misscoffee
    wrote on last edited by misscoffee
    #1

    I have Visual Studio + Qt(through vcpkg) + CMake project. I build my project and have message above in command prompt.

    https://forum.qt.io/topic/145248/error-building-some-meta-compiler-dependencies/3
    You can look at this topic, there was the problem that preceded this. THIS problem appeared after I deleted Q_OBJECT macro from classes which inheritate from QObject(they are not using signals so I think It will not disturb anything).

    It is important that after some manipulations "" in error mesages was replaced with path that I given so the full name of error now is
    Could not find the Qt platform plugin "windows" in "....\Qt6\plugins\platforms"

    This is popular error so
    What I tried(almost all):

    1. add next line to main

    int main( int argc, char *argv[] )
    {
    QCoreApplication::addLibraryPath("....\Qt6\plugins\platforms");
    QApplication app( argc, argv );
    ...
    return app.exec();
    }

    In "....\Qt6\plugins\platforms" qwindows.dll, qminimal.dll and two more files stored.

    1. use windeployqt, but It writes
      windeployqt cannot open catalogs.json, cannot find QWidgetsd.dll(although it exists in build folder)

    2. set this path through qt.conf in build folder(there was lines like
      [Paths]
      Plugins=[...\platforms] )

    3. use dll collector but it throws the same error like in cmd

    4. i set QT_QPA_PLATFORM_PLUGIN_PATH to env. var.

    P.S. i wrote it all with linux-like slashes also
    P.S. i have not found libEGL.dll in Qt bin

    1fe45988-2475-4d89-a43e-88298095fb8e-image.png

    Pl45m4P 1 Reply Last reply
    0
    • M misscoffee

      I have Visual Studio + Qt(through vcpkg) + CMake project. I build my project and have message above in command prompt.

      https://forum.qt.io/topic/145248/error-building-some-meta-compiler-dependencies/3
      You can look at this topic, there was the problem that preceded this. THIS problem appeared after I deleted Q_OBJECT macro from classes which inheritate from QObject(they are not using signals so I think It will not disturb anything).

      It is important that after some manipulations "" in error mesages was replaced with path that I given so the full name of error now is
      Could not find the Qt platform plugin "windows" in "....\Qt6\plugins\platforms"

      This is popular error so
      What I tried(almost all):

      1. add next line to main

      int main( int argc, char *argv[] )
      {
      QCoreApplication::addLibraryPath("....\Qt6\plugins\platforms");
      QApplication app( argc, argv );
      ...
      return app.exec();
      }

      In "....\Qt6\plugins\platforms" qwindows.dll, qminimal.dll and two more files stored.

      1. use windeployqt, but It writes
        windeployqt cannot open catalogs.json, cannot find QWidgetsd.dll(although it exists in build folder)

      2. set this path through qt.conf in build folder(there was lines like
        [Paths]
        Plugins=[...\platforms] )

      3. use dll collector but it throws the same error like in cmd

      4. i set QT_QPA_PLATFORM_PLUGIN_PATH to env. var.

      P.S. i wrote it all with linux-like slashes also
      P.S. i have not found libEGL.dll in Qt bin

      1fe45988-2475-4d89-a43e-88298095fb8e-image.png

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @misscoffee

      Have you moved your Qt installation or modified your PATH before that happened?

      "D:\DESKTOP\trashfromgit " laughed so hard :-)

      Edit:

      Check out @JKSH 's solution here

      • https://forum.qt.io/topic/90293/could-not-find-or-load-the-qt-platform-plugin-windows-in

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • K Offline
        K Offline
        K a r l l z y
        wrote on last edited by
        #3

        Did you solve that? I have the same problem and I checked that out @JKSH 's solution here which is totally different way to install qt. Since vcpkg install qt from source, so the environment variables are not modified manually.

        jsulmJ 1 Reply Last reply
        0
        • K K a r l l z y

          Did you solve that? I have the same problem and I checked that out @JKSH 's solution here which is totally different way to install qt. Since vcpkg install qt from source, so the environment variables are not modified manually.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @K-a-r-l-l-z-y Please provide more information: how did you deploy your app?
          On Windows you should use https://doc.qt.io/qt-6/windows-deployment.html

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

          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