summaryrefslogtreecommitdiff
path: root/silx/gui/qt/inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/qt/inspect.py')
-rw-r--r--silx/gui/qt/inspect.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/silx/gui/qt/inspect.py b/silx/gui/qt/inspect.py
index c6c2cbe..3c08835 100644
--- a/silx/gui/qt/inspect.py
+++ b/silx/gui/qt/inspect.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -62,9 +62,14 @@ if qt.BINDING in ('PyQt4', 'PyQt5'):
return not _isdeleted(obj)
elif qt.BINDING == 'PySide2':
- from PySide2.shiboken2 import isValid # noqa
- from PySide2.shiboken2 import createdByPython # noqa
- from PySide2.shiboken2 import ownedByPython # noqa
+ try:
+ from PySide2.shiboken2 import isValid # noqa
+ from PySide2.shiboken2 import createdByPython # noqa
+ from PySide2.shiboken2 import ownedByPython # noqa
+ except ImportError:
+ from shiboken2 import isValid # noqa
+ from shiboken2 import createdByPython # noqa
+ from shiboken2 import ownedByPython # noqa
elif qt.BINDING == 'PySide':
try: # Available through PySide