I am making my first GUI application with PyQt5 but it does not currently work with dark mode.
How do you enable dark mode in PyQt5?
I user PyQt5 v5.13.0 and freeze the app with PyInstaller on Mac, Linux and Windows.
If you need more information or some of the code, please tell me.
Install PyQt5 5.12.2
pip3 install pyqt5==5.12.2
Compile your app
Add this into info.plist
:
<key>NSRequiresAquaSystemAppearance</key>
<string>False</string>
There is no much difference between 5.12.2
and 5.13.0
but later doesn't support native dark mode on macOS.
On other platforms write separate style sheets and add trigger in settings or read system variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With