-
Notifications
You must be signed in to change notification settings - Fork 730
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
Dark theme in version 3.2.1 is not working #339
Comments
Hey @skp17, thanks for reporting. We've also noticed a similar problem in Spyder. @dpizetta, a simple way to reproduce this is by running the following commands in a virtualenv:
and then In [1]: from qdarkstyle import load_stylesheet
In [2]: css = load_stylesheet()
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[2], line 1
----> 1 css = load_stylesheet()
File ~/.virtualenvs/test-qdark/lib/python3.8/site-packages/qdarkstyle/__init__.py:341, in load_stylesheet(*args, **kwargs)
339 # No arguments
340 if not kwargs and not args:
--> 341 stylesheet = _load_stylesheet(qt_api='pyqt5')
343 # Old API arguments
344 elif 'pyside' in kwargs or isinstance(arg, bool):
File ~/.virtualenvs/test-qdark/lib/python3.8/site-packages/qdarkstyle/__init__.py:273, in _load_stylesheet(qt_api, palette)
271 stylesheet = ""
272 # Todo: check this raise type and add to docs
--> 273 raise FileNotFoundError("Unable to find QSS file '{}' "
274 "in resources.".format(qss_rc_path))
276 _logger.debug("Checking patches for being applied.")
278 # Todo: check execution order for these functions
279 # 1. Apply OS specific patches
FileNotFoundError: Unable to find QSS file ':qdarkstyle/dark/darkstyle.qss' in resources. This error doesn't happen in PyQt 5.15, but it does in version 5.12 and, according to the info reported by @skp17, in 5.11 as well. So, I think the assets need to be regenerated so that they work in older PyQt versions. Could you take a look at that? Thanks! |
Hey guys, thank you for reporting, I'll take a look this weekend. I think I generated the assets with pyside6, so maybe thats the problem. Thanks! |
Actually, this is a problem with the QtPy already mentioned some time ago in this. Since I'm building the assets in the Qt6, QtPy will try in this order PyQt5/PySide2/PyQt6/Pyside6. So, if it start with PySide6, QtPy won't test the other possibilities.
For now I'll rebuild the assets in Qt5, them with some time I can help with the PR for the QtPy. |
Describe Your Environment
Language
Python
Description / Steps to Reproduce [if necessary]
Simply running the command
$ qdarkstyle.example --palette=dark
produces an error.Everything works fine with QDarkStyle v3.1. However, I'm getting problems with v3.2 & v3.2.1.
Actual Result
Expected Results / Proposed Result
[A description, output ou image of the expected/proposed result]
Relevant Code [if necessary]
The text was updated successfully, but these errors were encountered: