Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.5.x] Detect qt5ct and workaround it #198

Merged
merged 2 commits into from
Feb 15, 2020

Conversation

s0600204
Copy link
Contributor

(Written in response to the recent various "icons not being drawn" comments.)

qt5ct creates (or requires the user to create) the environment argument QT_QPA_PLATFORMTHEME with the value qt5ct.

The code supplied below detects the existence of the environment argument, checks its value, and if relevant adds a (blank) argument to be passed to the invocation of QApplication. This appears to causes Qt to ignore the environment value and fallback on the default platform theme.


A fix doesn't seem to be needed for the 0.6/develop branch.

@FrancescoCeruti
Copy link
Owner

Nice, I'll look into merge it.
Did you consider using os.getev()?

Use native python functionality rather than from a third-party library.

The documentation of python's `os` module recommends modifying `os.environ`
directly, rather than using `os.unsetenv()`. (Modifying the former causes
the latter to be called; using the latter doesn't update the former.)
@s0600204
Copy link
Contributor Author

Knew I was overlooking something...

@FrancescoCeruti FrancescoCeruti merged commit 95bd2f6 into FrancescoCeruti:master Feb 15, 2020
@s0600204 s0600204 deleted the qt5ct_disable_0-5-1 branch February 15, 2020 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants