Qt for Python UiFiles
Jump to navigation
Jump to search
How to use Qt Creator to design Graphical Interfaces for PySide
This page describes the use of Qt Creator to create Graphical Interfaces for your PySide Software. You will need Qt Creator, Pyside and PySide-Tools (pyuic and pyrcc).
If you don’t know how to use Qt Creator, please go to Qt Creator (ver 2.5) Widget Tutorial [qt.io].
At Qt Creator, create a new Qt Design Form, choose “Main Window” for template. And save as “mainwindow.ui” . Add a Qlabel to the center of the centralwidget. You should get somethig like this :
And your mainwindow.ui
Python can’t read this ui file so to make it readable to python we need to process it with a script pyside-uic.
The command is:
The generated output file “mainwindow.py” is as follows:
we have to modify this mainwindow.py module:
And to run: