1

How do I convert my .ui files generated by Qt Creator to .py files?

I used to convert the .ui files to .py files using a .bat file on Windows:

@echo off
for %%f in (*.ui) do (
    echo %%f    
    C:\Python34\Lib\site-packages\PyQt5\pyuic5.bat -x %%f -o %%~nf.py
)
pause

I now no longer have access to a PC for the conversion (plus I'm tired of switching computers just to convert the file), so I need to be able to just convert the .ui files to .py in mac⁠OS.

  • Is there a `C:\Python34\Lib\site-packages\PyQt5\pyuic.sh` shell script? If so call it from a new sh script wrapper. – DavidPostill Dec 23 '18 at 16:33
  • What are you asking? How to run ```pyuic5``` on Mac? How to do a loop? What research have you done, and what have you learned? – Scott - Слава Україні Nov 05 '20 at 00:23
  • @Scott The question is about 2 years old and it was answered by someone who recommends just using `pyuic5` on macOS but — as a macOS user — I cannot even run it on my setup. So hey… Who knows at this point? Unless someone with macOS and experience with Qt can post here I guess. – Giacomo1968 Nov 05 '20 at 01:43

0 Answers0