Python GUI
Chris Roda · 2024
There are many interface packages available for Python. Tkinter is the graphical user interface packages installed in Python. While it is straight forward and easy to learn, it is limited and does not complement system environment appearance. PySide2 is covered in this chapter. PySide2 is installed with Houdini Python. It is robust and complements appearances of system environments. PySide2 interfaces may be created within Houdini or made to execute from the command-line. Subclasses created from PySide2 widget classes facilitate most convenient interface creation and maintenance. PySide2 employs a powerful strategy, called signal and slots for connecting user interface events with reactive functionality. QMainWindow classes are the central widgets most interfaces are built upon. They are equipped with toolbars, status bars and menu bars. Many additional widgets are introduced such as buttons, sliders, text boxes, dials, and other display devices. QDialog widgets are pop-up windows used for executing short-term tasks and brief communications. Technical artists most often employ QDialogButtonBox, QMessageBox, QFileDialog, and QColorDialog subclasses.