Open LarsGroh opened 6 years ago
How did you install PyQt5, with pip or manually ?
I used pip: pip install python-qt5
Is not PyQt5 the name of the package ?
I thought so as well...but: "pip install PyQt5" does not work. for python 27
Therefore I started looking for a PyQt5 Build for Python 27: https://github.com/pyqt/python-qt5
Maybe a problem with the build?
Oh, it looks like there are no official binary packages for python2 so you have been forced to use a third party solution.
I suppose you cannot move to python 3...
In the readme of the github repository it suggests to use:
pip install git+git://github.com/pyqt/python-qt5.git
for a recent version
After months I got back to this issue. I installed qt 5 as suggested.
Unfortunately a simple example like this caused Unreal to freeze and then to crash:
from PyQt5 import QtWidgets; new = QtWidgets.QWidget(); new.show()
Any ideas?
Have you followed the tutorial (in the README) on how to implement the qt loop ? Just spawning widgets is not enough. In addition to this i strongly suggest PySide2 as wrapper
Just tried the tutorial with the qt loop and replaced PySide2 with PyQt5. Now I am getting the inital error again, that the windows plugin was missing.
The reason to use PyQt5 instead of PySide2 is that we use Python 2.7. To my knowledge there is no version of PySide2 for Python 2.7. But saying this I relize that other applications (e.g. Maya) use PySide2 with Python 2.7. So not sure how to get this working within Unreal.
Oh ok, well in such a case you need to stick with PyQt5, just ensure to build the ticker loop (should be easy to adapt for PyQT5)
Alright... Seems like the path to the windows plugins of qt is not automatically set- Setting this environment variable solves the issue:
QT_QPA_PLATFORM_PLUGIN_PATH = C:\Python27\Lib\site-packages\PyQt5\plugins\platforms
Solution found on: https://blog.abstractfactory.io/pyqt5-1-1-for-python-2-7/
Though setting the varible on runtime as suggested on the page does not solve the issue. Decided to set it in the system.
Hi,
when I try to use PyQt5 I get the following error when I try to execute the Qt sample code:
"This application failed to start because it could not find or load the Qt platform plugin windows. Reinstalling the application may fix this problem"
I checked the files in C:\Python27\Lib\site-packages\PyQt5\plugins\platforms The "qwindows.dll" is there.
Any idea how to fix this?