mirror of
https://github.com/ColinDuquesnoy/QDarkStyleSheet.git
synced 2026-08-29 08:34:30 +08:00
FIX: warnings functional call, fixes #325
This commit is contained in:
@@ -355,7 +355,7 @@ def load_stylesheet(*args, **kwargs):
|
||||
stylesheet = _load_stylesheet(qt_api='pyqt4', palette=palette)
|
||||
|
||||
# Deprecation warning only for old API
|
||||
warnings.warning(DEPRECATION_MSG, DeprecationWarning)
|
||||
warnings.warn(DEPRECATION_MSG, DeprecationWarning)
|
||||
|
||||
# New API arguments
|
||||
elif 'qt_api' in kwargs or isinstance(arg, str):
|
||||
@@ -453,7 +453,7 @@ def load_stylesheet_from_environment(is_pyqtgraph=False):
|
||||
Returns:
|
||||
str: the stylesheet string.
|
||||
"""
|
||||
warnings.warning(DEPRECATION_MSG, DeprecationWarning)
|
||||
warnings.warn(DEPRECATION_MSG, DeprecationWarning)
|
||||
|
||||
if is_pyqtgraph:
|
||||
stylesheet = _load_stylesheet(qt_api=os.environ.get('PYQTGRAPH_QT_LIB', None))
|
||||
|
||||
Reference in New Issue
Block a user