This application failed start because it could not find or load the Qt platform plugin "windows"

created at 08-20-2021 views: 25

description

The error is shown in the figure. This is in Debug mode. It is guessed that the environment variable related to the system directory is not set; but the environment variable has been set, it will still appear, so the solution is as follows.

Qt error

solution

Set QT_QPA_PLATFORM_PLUGIN_PATH variable

Add environment variables inside the QT project, the directory is: C:\Qt\Qt5.7.0\5.7\msvc2015_64\plugins

Set QT_QPA_PLATFORM_PLUGIN_PATH variable

created at:08-20-2021
edited at: 08-20-2021: