qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
-
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):- 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.
-
use windeployqt, but It writes
windeployqt cannot open catalogs.json, cannot find QWidgetsd.dll(although it exists in build folder) -
set this path through qt.conf in build folder(there was lines like
[Paths]
Plugins=[...\platforms] ) -
use dll collector but it throws the same error like in cmd
-
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 -
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