2

I've packaged a python application written in Python 3.6 with PyQt5 using PyInstaller for MacOS. The application runs correctly, but the interface does not use a native-looking style. Running the program manually does use the correct style, and PyQt.QtWidgets.StyleFactory.keys() gives 'macintosh', 'Windows', and 'Fusion'. When running the packaged application, only 'Windows' and 'Fusion' are available. How can I package the 'macintosh' style with my application and instruct PyQt5 to use the native style?

Aidan Wolk
  • 126
  • 1
  • 6
  • I've recently run into similar problem. In my case I use the app on windows and when run from code it correctly uses the native style (which is called 'windowsvista' style) but when frozen (packaged) with pyinstaller there is no 'windowsvista' available so the app uses 'windows' style which looks like pre windows xp era. So far no idea how to solve this... – Devligue Feb 26 '18 at 09:26

1 Answers1

3

The error seems to have been fixed in a unmerged branch of PyInstaller. More information can be found on the GitHub pull request conversation, but reinstalling PyInstaller using pip install https://github.com/bjones1/pyinstaller/archive/pyqt5_fix.zip fixed the style issue for me.

Aidan Wolk
  • 126
  • 1
  • 6