MeVisLab / pythonqt

Dynamic Python binding for Qt Applications
https://mevislab.github.io/pythonqt/
GNU Lesser General Public License v2.1
251 stars 89 forks source link

This application failed to start because no Qt platform plugin could be initialized. #203

Closed huskier closed 7 months ago

huskier commented 7 months ago

After compiled the PythonQt, we try to run the example program PyGuiExample.exe in the lib directory, and we've gotten the following error. What's wrong with our program? Thanks in advance. ErrorMessage

mrbean-bremen commented 7 months ago

This looks like your Qt installation is not found, or the wrong one is found. Have you checked that the plugins/platforms directory exists in the path of the Qt binaries, and that the Qt binaries are in the PATH?

huskier commented 7 months ago

@mrbean-bremen Thank you. After added the user environment variable QT_QPA_PLATFORM_PLUGIN_PATH (value: C:\Application\Qt\5.15.2\msvc2019_64\plugins\platforms), the issue is fixed.

mrbean-bremen commented 7 months ago

Ah, good to know. I'm converting this into a discussion issue, as it may help others.