Could not find the Qt platform plugin "windows"
-
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
Also note that the project compiles successfully.
-
@Deathcomes
Set environment variableQT_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. -
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?
-
Hi,
Are you trying to run your application outside Qt Creator ? If so, did you proceed with the deployment procedure ?
-
Any ideas? If you want more details tell me.
-
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.
-
@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.
-
@Bonnie I always leave that folder as it so that i don't "break" something. I will check it although!
-
@Bonnie I checked it and the same thing happens.
-
@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? -
@hskoglund Same thing happens with a new one.
-
Do you have other versions of Qt installed on your system ? For example by other applications ?
-
I meant: check your system for other Qt version that may have been installed along any of your applications.