aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/__init__.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/PySide2/__init__.py.in')
-rw-r--r--sources/pyside2/PySide2/__init__.py.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/sources/pyside2/PySide2/__init__.py.in b/sources/pyside2/PySide2/__init__.py.in
index 4ce266b69..f33b05e31 100644
--- a/sources/pyside2/PySide2/__init__.py.in
+++ b/sources/pyside2/PySide2/__init__.py.in
@@ -20,10 +20,16 @@ def _setupQtDirectories():
# Used by signature module.
os.environ["PYSIDE_PACKAGE_DIR"] = pyside_package_dir
- # On Windows add the PySide2\openssl folder (if it exists) to the
- # PATH so that the SSL DLLs can be found when Qt tries to dynamically
- # load them. Tell Qt to load them and then reset the PATH.
if sys.platform == 'win32':
+ # PATH has to contain the package directory, otherwise plugins
+ # won't be able to find their required Qt libraries (e.g. the
+ # svg image plugin won't find Qt5Svg.dll).
+ os.environ['PATH'] = pyside_package_dir + ";" + os.environ['PATH']
+
+ # On Windows add the PySide2\openssl folder (if it exists) to
+ # the PATH so that the SSL DLLs can be found when Qt tries to
+ # dynamically load them. Tell Qt to load them and then reset
+ # the PATH.
openssl_dir = os.path.join(pyside_package_dir, 'openssl')
if os.path.exists(openssl_dir):
path = os.environ['PATH']