PySideuic Workflow

Maya supports PySide, an open-source software project that provides Python bindings for the Qt framework, and lets developers use the Qt framework to write software in Python.

Use the following mayapy pyside-uic script if you want to convert a .ui file that originates from Qt Designer into Python code:

import sys, pprint
from pysideuic import compileUi
pyfile = open("[path to output python file]\output.py", 'w')
compileUi("[path to input ui file]\input.ui", pyfile, False, 4,
False)
pyfile.close()
Note: You must use mayapy pyside-uic if you want to compile a .ui file.

You can find more information about Pysideuic at the PySide website.