Many people want to use Qt Designer without having to download gigabytes of other software. Here are small, standalone installers of Qt Designer for Windows and Mac:
If you encounter any problems, please just send us an email. We'd be happy to help.
Qt Designer is a tool for quickly building graphical user interfaces with widgets from the Qt GUI framework. It gives you a simple drag-and-drop interface for laying out components such as buttons, text fields, combo boxes and more. Here is a screenshot of Qt Designer on Windows:
Qt Designer produces
.ui files. This is a
special XML-based format that stores your widgets as a tree.
You can either load these files at runtime, or have them
translated to a programming language such as C++ or Python.
Many people like to use Qt Designer together with Python because it is a dynamic language that lends itself well to rapid prototyping. The easiest way to combine the two is via the PyQt bindings. To install PyQt, simply enter the following on the command line:
python3 -m venv venv source venv/bin/activate # or "call venv\Scripts\activate.bat" on Windows python3 -m pip install PyQt5
(This assumes you have Python 3 installed.)
Suppose you have saved your file from Qt Designer as
dialog.ui. Then you can create another file,
main.py, with the following contents:
from PyQt5 import QtCore, uic, QtWidgets import sys UIClass, QtBaseClass = uic.loadUiType("dialog.ui") class MyApp(UIClass, QtBaseClass): def __init__(self): UIClass.__init__(self) QtBaseClass.__init__(self) self.setupUi(self) if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) window = MyApp() window.show() sys.exit(app.exec_())
When you then invoke
on the command line, your dialog should open:
(If you have closed the command prompt in the meantime, you
may have to execute the
call statement from above
Qt Designer normally ships as a part of Qt Creator. This is Qt's official editor / IDE and lets you do a lot more than just graphically design user interfaces. It is a full-fledged and very powerful C++ IDE. This power comes at a price however: The download for Qt Creator is gigabytes in size!
This page was created for people who only need Qt Designer. The download links here contain minimal, self-contained installers of just Qt Designer that are orders of magnitude smaller. Here they are again:
Michael has been working with Qt and Python since 2016, when he started fman, a cross-platform file manager. Frustrated with the many difficulties of creating a desktop application, Michael open sourced fman's build system (fbs). It lets you create GUIs with Qt and Python in minutes instead of months!