Qt is one of the most important frameworks for creating graphical user interfaces (GUIs). The PyQt library offers the possibility to work with Qt using Python. PyQt can be used to create standalone applications but in GIS it is most commonly used to create input masks for QGIS plugins. To poperly integrate GUIs into QGIS plugins, a good understanding of object-oriented programming (OOP) is required. This course therefore first covers OOP by introducing classes, methods and inheritance. The remainder of the course is dedicated to creating GUIs in Qt Designer and using Python to communicate with a GUI.
Object-Oriented Programming (OOP)
- classes
- methods
- inheritance
- methods vs. functions
PyQt & Qt Designer
- Working with different elements: buttons, radio buttons & checkboxes, combo boxes (dropdowns), text input
- Integration of a GUI in QGIS
- Reading user input from a GUI
- Programmatically populating input fields of a GUI
- Working with QFileDialog: Entering file and directory paths
- Exercises: Creation of GUIs that use PyQGIS (e.g. loading shapefiles into a QGIS project, geoprocessing)



