Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-02 11:08:57 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-02 15:10:08 +0100
commitb6ec4eab0d9bcfc01d73fbb8f576dfff4a000e88 (patch)
treeefec199a936de73fcba7f8757a6965fe8ab4a469 /sources/pyside-tools/pyside_tool.py
parentccbb1b4417fad4fb93bd8788ef2bb8d607ef56ae (diff)
Qt Designer: Fix loading the custom widgets in virtual env on Windows when base Python is not in path
Add sys._base_executable to the path. Pick-to: 6.4 6.2 Change-Id: I08154453d6a0b4565e9aff8d46bf6950b20ef5ce Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside-tools/pyside_tool.py')
-rw-r--r--sources/pyside-tools/pyside_tool.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/pyside-tools/pyside_tool.py b/sources/pyside-tools/pyside_tool.py
index f442ee254..a70f26d24 100644
--- a/sources/pyside-tools/pyside_tool.py
+++ b/sources/pyside-tools/pyside_tool.py
@@ -129,6 +129,10 @@ def designer():
framework_prefix = sysconfig.get_config_var("PYTHONFRAMEWORKPREFIX")
lib_path = os.fspath(Path(framework_prefix) / library_name)
os.environ['DYLD_INSERT_LIBRARIES'] = lib_path
+ elif sys.platform == 'win32':
+ # Find Python DLLs from the base installation
+ if os.environ.get("VIRTUAL_ENV"):
+ _append_to_path_var("PATH", os.fspath(Path(sys._base_executable).parent))
# Add the Wiggly Widget example
wiggly_dir = os.fspath(pyside_dir / 'examples' / 'widgetbinding')
_append_to_path_var('PYSIDE_DESIGNER_PLUGINS', wiggly_dir)