PySide6 - windeployqt: " *.exe does not seem to be a Qt executable "
-
Hi!
I read that PySide6 and pyinstaller are not compatible yet. Therefore, I am trying to use windeployqt as suggested here to create my bundle in order to find the dependencies for the executable.What I did:
pyinstaller -w abc.spec abc.py
and then, as suggested here:
D:\myQT\6.2.1\msvc2019_64>windeployqt.exe "abc.exe"
and I got this error:
abc.exe 64 bit, debug executable abc.exe does not seem to be a Qt executable.
What should I do?
-
Thanks for the suggestion.
I've just done it. Here are the dlls inside the PySide6/plugins/platforms folder. The UI still doesn't look correct.
@valvador92 You have to copy the plugin styles.
-
Hi!
I read that PySide6 and pyinstaller are not compatible yet. Therefore, I am trying to use windeployqt as suggested here to create my bundle in order to find the dependencies for the executable.What I did:
pyinstaller -w abc.spec abc.py
and then, as suggested here:
D:\myQT\6.2.1\msvc2019_64>windeployqt.exe "abc.exe"
and I got this error:
abc.exe 64 bit, debug executable abc.exe does not seem to be a Qt executable.
What should I do?
@valvador92 said in PySide6 - windeployqt: " *.exe does not seem to be a Qt executable ":
What should I do?
You should do what was suggested in the first link you posted: "On Windows, this can be achieved by running the windeployqt tool from the Qt SDK on the Qt libraries present in the dist directory, for example:
windeployqt dist\app\Qt6Widgets.dll
"
You are calling windeployqt on your exe instead, which is wrong (this will only work with exe generated from C++ project). -
Hi!
Thanks for the answer. I did it for those ones.
I got this error for Qt6Core.dll
C:\Users\user\Documents\SB5>"D:\Programm\myQT\6.2.1\msvc2019_64\bin\windeployqt.exe" dist\SmartBlur\Qt6Core.dll C:\Users\user\Documents\SB5\dist\SmartBlur\Qt6Core.dll 64 bit, release executable
However, my executable is now working but the UI does not look correct:
It should be:
To make the UI look correct I had to add the entire plugins folder from PySide6.
Is there a smarter way to only add what is needed inside this plugins folder in order to optimize the size? -
Hi!
Thanks for the answer. I did it for those ones.
I got this error for Qt6Core.dll
C:\Users\user\Documents\SB5>"D:\Programm\myQT\6.2.1\msvc2019_64\bin\windeployqt.exe" dist\SmartBlur\Qt6Core.dll C:\Users\user\Documents\SB5\dist\SmartBlur\Qt6Core.dll 64 bit, release executable
However, my executable is now working but the UI does not look correct:
It should be:
To make the UI look correct I had to add the entire plugins folder from PySide6.
Is there a smarter way to only add what is needed inside this plugins folder in order to optimize the size?@valvador92 said in PySide6 - windeployqt: " *.exe does not seem to be a Qt executable ":
To make the UI look correct I had to add the entire plugins folder from PySide6.
What was missing was the platform plug-in, just add those
-
Thanks for the suggestion.
I've just done it. Here are the dlls inside the PySide6/plugins/platforms folder. The UI still doesn't look correct.
-
Thanks for the suggestion.
I've just done it. Here are the dlls inside the PySide6/plugins/platforms folder. The UI still doesn't look correct.
@valvador92 You have to copy the plugin styles.
-
Thanks a lot both of you :) It worked! I can now continue on my project. The blocking point was the creation of the executable. I hope that the creation of the installer with Wix toolset will work as well!