diff options
author | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2018-12-17 12:28:45 +0100 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2018-12-17 12:28:45 +0100 |
commit | c49572a2e90b398e90a43f86b490f27ee6c58de6 (patch) | |
tree | d130cf7dfc3cf73157e1bece8173331bb4bc7156 /silx/gui/qt/_utils.py | |
parent | 0bbc8ab933e62c1fa6d548e879ae6d98cbd461f1 (diff) | |
parent | cebdc9244c019224846cb8d2668080fe386a6adc (diff) |
Merge tag 'upstream/0.9.0+dfsg'
Upstream version 0.9.0+dfsg
Diffstat (limited to 'silx/gui/qt/_utils.py')
-rw-r--r-- | silx/gui/qt/_utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/silx/gui/qt/_utils.py b/silx/gui/qt/_utils.py index be55465..912f08c 100644 --- a/silx/gui/qt/_utils.py +++ b/silx/gui/qt/_utils.py @@ -36,8 +36,11 @@ from . import _qt as qt def supportedImageFormats(): """Return a set of string of file format extensions supported by the Qt runtime.""" - if sys.version_info[0] < 3 or qt.BINDING in ('PySide', 'PySide2'): + if sys.version_info[0] < 3 or qt.BINDING == 'PySide': convert = str + elif qt.BINDING == 'PySide2': + def convert(data): + return str(data.data(), 'ascii') else: convert = lambda data: str(data, 'ascii') formats = qt.QImageReader.supportedImageFormats() |