diff options
author | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2018-12-17 12:28:24 +0100 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2018-12-17 12:28:24 +0100 |
commit | cebdc9244c019224846cb8d2668080fe386a6adc (patch) | |
tree | aedec55da0f9dd4fc4d6c7eb0f58489a956e2e8c /silx/gui/qt/_utils.py | |
parent | 159ef14fb9e198bb0066ea14e6b980f065de63dd (diff) |
New 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() |