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 Sep 30, 2023
1 parent 604b7a0 commit c47ad89
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 c47ad89

Please sign in to comment.