From c47ad898950e1969f53bcdfc3dcf335cd75bd539 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Mon, 25 Sep 2023 16:30:27 +0200 Subject: [PATCH] Support pyside2-uic for PySide2 --- modules/pymol/Qt/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/pymol/Qt/utils.py b/modules/pymol/Qt/utils.py index bf7513795..bd6e1cb27 100644 --- a/modules/pymol/Qt/utils.py +++ b/modules/pymol/Qt/utils.py @@ -288,7 +288,9 @@ def loadUi(uifile, widget): if pysideuic is None: import subprocess - p = subprocess.Popen(['uic', '-g', 'python', uifile], + import shutil + uic_exe = shutil.which("pyside2-uic") or "uic" + p = subprocess.Popen([uic_exe, '-g', 'python', uifile], stdout=subprocess.PIPE) source = p.communicate()[0] # workaround for empty retranslateUi bug