Skip to Content
Learning Robotics using Python - Second Edition
book

Learning Robotics using Python - Second Edition

by Lentin Joseph
June 2018
Beginner to intermediate
280 pages
6h 58m
English
Packt Publishing
Content preview from Learning Robotics using Python - Second Edition

Converting a UI file into Python code

After designing the UI file, we can convert the UI file into its equivalent Python code. The conversion is done using a pyuic compiler. We have already installed this tool while installing PyQt/PySide. The following are the commands to convert a Qt UI file into a Python file.

We have to use different commands for PyQt and PySide. The following command is to convert the UI into its PyQt equivalent file:

    $ pyuic4 -x hello_world.ui -o hello_world.py  

The pyuic4 is a UI compiler to convert a UI file into its equivalent Python code. We need to mention the UI filename after the -x argument and mention the output filename after the -o argument.

There are not many changes to the PySide command. Instead of

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Robotics using Python

Learning Robotics using Python

Lentin Joseph
Python Robotics Projects

Python Robotics Projects

Prof. Diwakar Vaish

Publisher Resources

ISBN: 9781788623315Supplemental Content