Convert Qt Desiger UI File to Python Script File (.py) – PyQT Tutorial

By | April 13, 2021

Qt designer is a powerful tool to design pyqt gui. It will create some ui files.

ui files created by qt designer

However, in order to use these ui files in python, we should convert them to .py files. In this tutorial, we will introduce you how to convert.

First of all, you should install Qt Designer.

Then, we can use pyuic5 command to convert. Here is an example:

pyuic5 -o designer.ui

In this example, designer.ui is the input ui file, is the output python script file.

However, if you encounter Error: one input ui-file must be specified. You can fix this error by this tutorial:

Fix pyuic5 Error: one input ui-file must be specified – PyQT5 Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *