Reputation: 126
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?
Upvotes: 2
Views: 615
Reputation: 126
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.
Upvotes: 3