No Qt platform plugin could be initialized
-
After reinstalling from win 10 to win 11 I would like to upgrade current qt installation.
When running on-line qt installer
qt-online-installer-windows-x64-4.9.0.exe
the following error occurs:
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: direct2d, minimal, offscreen, windows
I read a lot of articles regarding this issue. I tried to copy the content of the folder
qt6\plugins\platforms
to the installation folder, but nothing happend.
Suprisingly, other SW like QtDesigner from the previous installation as well as LyX work.
The older installer
qt-unified-windows-x64-4.6.1-online.exe
works well but all newer installers since
qt-unified-windows-x64-4.7.0-online.exe
...
generate the above-mentioned error.Thanks for your help...
@Tom_B said in No Qt platform plugin could be initialized:
ould like to upgrade current qt installation
If you already have a Qt installation then you can simply use the Qt maintenance tool to install/remove Qt versions and tools.
-
Setting the environment variable QT_DEBUG_PLUGINS to a non-zero value should result in information about the platform plugin loading to be dumped to the console. Sometimes it provides very direct and actionable feedback, eg reporting a missing dependency or version mismatch.
Using QT_WIN_DEBUG_CONSOLE is probably also necessary.
Further documentation: https://doc.qt.io/qt-6/debug.html#environment-variables-recognized-by-qt
-
I found the solution. Deleting the User/System variable
QT_QPA_PLATFORM_PLUGIN_PATH
c:\Users\Tomas\AppData\Roaming\Python\Python36\site-packages\PyQt6\Qt6\plugins\platformssolved the problem. Probably this value is a residual from a previous installation that was not removed. The new installator is sensitive to this item.
-
Thank you very much for your comment. I set both varibles to 1 in both sections, User variables and System variables, restated the PC. However, the qt installator threw the same error code and did not start.
@Tom_B said in No Qt platform plugin could be initialized:
Thank you very much for your comment. I set both varibles to 1 in both sections, User variables and System variables, restated the PC. However, the qt installator threw the same error code and did not start.
QT_WIN_DEBUG_CONSOLE
expects a value ofnew
orattach
.1
is probably the same as not setting it.