Yuanshen Launcher cannot be opened, prompting "no Qt platform plugin could be initialized" solution

 Yuanshin Launcher cannot be opened, the prompt is as follows

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Analyze the reasons


 This problem occurs because the launcher is written in Qt, and the qwindows.dll file cannot be found, and there is no answer to this question in the FAQ on the official website, and no one has encountered this problem. The official Customer service is just giving feedback.

Yuanshen actually packaged this file in the platform folder of the Anzhuan directory when it was installed. This problem occurred because the programmer did not directly specify the location of the qt platform plug-in in the program, which caused the program to call " My Computer" - "Advanced System Settings" - "Advanced" - "Environment Variables" QT_QPA_PLATFORM_PLUGIN_PATH and the path pointed to by QT_PLUGIN_PATH, and this is the location of the pyQt plug-in that I used when I was doing python development. To put it bluntly, it is pyQt The conflict with Qt, after all, there is still a difference between the two.

 

Solution


 For this situation, it is unreliable to download the latest version of Qt installation package specifically on the Internet, and then copy the platform folder to the original God installation directory, and it cannot solve the problem. Adding Qt's plugin path in QT_QPA_PLATFORM_PLUGIN_PATH and QT_PLUGIN_PATH also has no effect.

The real solution is to delete QT_QPA_PLATFORM_PLUGIN_PATH and QT_PLUGIN_PATH in the environment variables , it's as simple as that. . . Or change the names of these two variables, and change them back when pyQt is used.

bksn, Mihayou.

UPDATE: Someone asked how to delete environment variables, win+s search for advanced system settings

 

Guess you like

Origin blog.csdn.net/chiwang_andy/article/details/130109126