Publication date : 07/12/2024

Course : Python, programming QGIS extensions

Practical course - 3d - 21h00 - Ref. QGS
Price : 1650 € E.T.

Python, programming QGIS extensions




QGIS is a free GIS (Geographic Information System) software that lets you write new functions using the Python language. This course teaches you how to write a new QGIS function in Python (integrating a graphical interface in Qt).


INTER
IN-HOUSE
CUSTOM

Practical course in person or remote class
Disponible en anglais, à la demande

Ref. QGS
  3d - 21h00
1650 € E.T.




QGIS is a free GIS (Geographic Information System) software that lets you write new functions using the Python language. This course teaches you how to write a new QGIS function in Python (integrating a graphical interface in Qt).


Teaching objectives
At the end of the training, the participant will be able to:
Learn the basics of PyQT
Discover the QGIS API
Be able to build a QGIS extension

Intended audience
Developers supporting a geomatics department.

Prerequisites
Knowledge of geomatics and Python.

Practical details
Hands-on work
Training alternating theory and practice.

Course schedule

1
Structure of a QGIS extension

  • Basic extension files.
  • The initialization file.
  • The main class file.
  • Ancillary functions file.
  • The graphical interface.
  • The interaction file.
  • Event management.
  • Create actions associated with events.
Hands-on work
Writing an extension.

2
Distribution of a plugin, creation of a repository

  • QGIS extension repository system.
  • The extension installer.
  • Add an extension to QGIS.
  • Mandatory files (metadata).
  • Depositing and sharing extensions.
Hands-on work
Submission of an extension.

3
PyQt

  • Qt widgets.
  • Basic HMI components (QMainWindow, QFrame, QLabel...).
  • Widget customization.
  • Event management.
  • Notions of signal and slot.
  • Link between Qt and Python.
  • Integration of widgets in python code.
  • Signal and slot management.
Hands-on work
Write a Python program with a PyQt interface.

4
Writing an extension with a Qt interface

  • Create extensions with a PyQt interface.
  • Distribute the extension.