diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-11-02 11:08:57 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-11-02 15:10:08 +0100 |
commit | b6ec4eab0d9bcfc01d73fbb8f576dfff4a000e88 (patch) | |
tree | efec199a936de73fcba7f8757a6965fe8ab4a469 /sources/pyside-tools/pyside_tool.py | |
parent | ccbb1b4417fad4fb93bd8788ef2bb8d607ef56ae (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.py | 4 |
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) |