'Pyuic4' is not recognized as an internal external command

前端 未结 4 1486
面向向阳花
面向向阳花 2021-01-18 04:31

Im trying to compile a ui file by using Pyuic, but i can\'t get it to work... Every time i try using the command

pyuic4 -o OutFile_ui.py InFile.ui

4条回答
  •  半阙折子戏
    2021-01-18 05:26

    sk11 is right. Do the following:

    • Go to \Lib\site-packages\PyQt4.
    • There is a pyuic4.bat file in this directory. Copy your .ui file here.
    • In cmd, change the directory to \Lib\site-packages\PyQt4.
    • Convert the .ui to .py file using pyuic4 -x name_of_ui_file.ui -o chosen_name.py.

    This is so basic but it works!

提交回复
热议问题