From cebdc9244c019224846cb8d2668080fe386a6adc Mon Sep 17 00:00:00 2001 From: Alexandre Marie Date: Mon, 17 Dec 2018 12:28:24 +0100 Subject: New upstream version 0.9.0+dfsg --- silx/gui/qt/_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'silx/gui/qt/_utils.py') 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() -- cgit v1.2.3