aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/support/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/PySide2/support/__init__.py')
-rw-r--r--sources/pyside2/PySide2/support/__init__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/sources/pyside2/PySide2/support/__init__.py b/sources/pyside2/PySide2/support/__init__.py
index b2085d892..6a6d267b6 100644
--- a/sources/pyside2/PySide2/support/__init__.py
+++ b/sources/pyside2/PySide2/support/__init__.py
@@ -37,4 +37,12 @@
##
#############################################################################
-# This file has intentionally no content.
+# Import VoidPtr type to expose it under PySide2.support.VoidPtr
+try:
+ # The normal import statement when PySide2 is installed.
+ from PySide2.shiboken2 import VoidPtr
+except ImportError:
+ # When running make test in shiboken build dir, or when running testrunner.py,
+ # shiboken2 is not part of the PySide2 module, so it needs to be imported as a standalone
+ # module.
+ from shiboken2 import VoidPtr