Hello, I appreciate all the work that's been put into this package, and I'd love to help contribute, but I'm not sure how to fix this issue on my own.
In PySide6 you can use from __feature__ import snake_case to switch to more Python-friendly naming. If you attempt this import before import qt-material, it will be overridden by qt-material's internal PySide6 imports. If you attempt this import after importing qt-material, you receive the error AttributeError: type object 'PySide6.QtGui.QFontDatabase' has no attribute 'addApplicationFont' which is of course thrown by the first line in qt-material that calls a function with camel case.
It would be nice if we didn't have to choose between PySide6's snake_case and qt-material theming, but if there isn't a good fix for this, I understand.
EDIT:
Currently the only workaround I've found is to switch to snake case after applying the style sheet like so
if __name__ == '__main__':
app = QApplication()
apply_stylesheet(app, theme='dark_blue.xml')
from __feature__ import snake_case
...
Hello, I appreciate all the work that's been put into this package, and I'd love to help contribute, but I'm not sure how to fix this issue on my own.
In PySide6 you can use
from __feature__ import snake_case
to switch to more Python-friendly naming. If you attempt this import beforeimport qt-material
, it will be overridden by qt-material's internal PySide6 imports. If you attempt this import after importing qt-material, you receive the errorAttributeError: type object 'PySide6.QtGui.QFontDatabase' has no attribute 'addApplicationFont'
which is of course thrown by the first line in qt-material that calls a function with camel case.It would be nice if we didn't have to choose between PySide6's snake_case and qt-material theming, but if there isn't a good fix for this, I understand.
EDIT: Currently the only workaround I've found is to switch to snake case after applying the style sheet like so