It is sometimes useful to be able to include some specific Python code in the output generated by pyuic. For example, if you are using custom widgets, pyuic has no way of knowing the name of the Python module containing the widget and so cannot generate the required import statement. To help get around this, pyuic will extract any lines entered in the Comment field of Qt Designer's Form Settings dialog that begin with Python: and copies them to the generated output.
Here's a simple example showing the contents of the Comment field.
This comment will be ignored by pyuic.
Python:
Python:# Import our custom widget.
Python:from foo import bar