Convert pyQt UI to python

后端 未结 10 1687
谎友^
谎友^ 2020-11-30 20:51

Is there a way to convert a ui formed with qtDesigner to a python version to use without having an extra file?

I\'m using Maya for this UI, and converting this UI fi

10条回答
  •  北海茫月
    2020-11-30 21:22

    Update for anyone using PyQt5 with python 3.x:

    1. Open terminal (eg. Powershell, cmd etc.)
    2. cd into the folder with your .ui file.
    3. Type: "C:\python\Lib\site-packages\PyQt5\pyuic5.bat" -x Trial.ui -o trial_gui.py for cases where PyQt5 is not a path variable. The path in quotes " " represents where the pyuic5.bat file is.

    This should work!

提交回复
热议问题