demar
demar

Reputation: 514

PyQt compiled with PyInstaller looks strange (old) - macOS

I've written a small PyQt script that does a quiz with radio buttons and a submit button (I can post the code if you want). When I run it as a script, the buttons and checkbox have a modern look and feel and look exactly like a normal Qt app. However, when I compile it with PyInstaller, it results in some ancient-looking look and feel which seems like it belongs in XP.

Here is a screenshot comparing the two (compiled on the right): Running as a script on the left, compiled on the right

My PyInstaller compile code is pyinstaller quiz.py --onefile --windowed --add-data questions.csv:.

Regardless of whether it is run in windowed or not, or in onefile mode or not, I get this ancient look and feel.

Upvotes: 3

Views: 992

Answers (1)

user9510595
user9510595

Reputation:

The newest version of pyqt5 isn't compatible with pyinstaller; use the older version of pyqt5.

To re-install it through pip:

pip3 install pyqt5==5.9.2

or

pip3 install https://pypi.python.org/packages/5e/41/93bf8f289b476bc5d8cece7948a166cbcea761f5b1262e5fdd7076a5e02a/PyQt5-5.9.2-5.9.3-cp35.cp36.cp37-abi3-macosx_10_6_intel.whl#md5=926b3841d74d178171a2bbc0946fe2a4

You're welcome!

Upvotes: 4

Related Questions