Skip to content

Commit

Permalink
Support pyside2-uic for PySide2
Browse files Browse the repository at this point in the history
  • Loading branch information
speleo3 committed Feb 1, 2024
1 parent ce7d695 commit f850d84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/pymol/Qt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f850d84

Please sign in to comment.